INNER CODE UNIT · Go
WithArgs
alibaba/sentinel-golang · api/api.go:97
func WithArgs(args ...interface{}) EntryOption {
return func(opts *EntryOptions) {
opts.args = append(opts.args, args...)
}
}
// WithSlotChain sets the slot chain.
func WithSlotChain(chain *base.SlotChain) EntryOption {
return func(opts *EntryOptions) {
opts.slotChain = chain
}
}
// WithAttachment set the resource entry with the given k-v pair
func WithAttachment(key interface{}, value interface{}) EntryOption {
return func(opts *EntryOptions) {
if opts.attachments == nil {
opts.attachments = make(map[interface{}]interface{}, 8)