INNER CODE UNIT · Go
WithSlotChain
alibaba/sentinel-golang · api/api.go:104
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)
}
opts.attachments[key] = value
}
}
// WithAttachments set the resource entry with the given k-v pairs
func WithAttachments(data map[interface{}]interface{}) EntryOption {