INNER CODE UNIT · Go
WithResourceType
alibaba/sentinel-golang · api/api.go:61
func WithResourceType(resourceType base.ResourceType) EntryOption {
return func(opts *EntryOptions) {
opts.resourceType = resourceType
}
}
// WithTrafficType sets the resource entry with the given traffic type.
func WithTrafficType(entryType base.TrafficType) EntryOption {
return func(opts *EntryOptions) {
opts.entryType = entryType
}
}
// DEPRECATED: use WithBatchCount instead.
// WithAcquireCount sets the resource entry with the given batch count (by default 1).
func WithAcquireCount(acquireCount uint32) EntryOption {
return func(opts *EntryOptions) {
opts.batchCount = acquireCount