INNER CODE UNIT · Go
WithTrafficType
alibaba/sentinel-golang · api/api.go:68
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
}
}
// WithBatchCount sets the resource entry with the given batch count (by default 1).
func WithBatchCount(batchCount uint32) EntryOption {
return func(opts *EntryOptions) {
opts.batchCount = batchCount