Documentation
¶
Index ¶
- Constants
- Variables
- func Enqueue(queue *lane.Deque, id interface{}, ...) error
- func Remarshal(in, out interface{}) error
- func Trigger(ctx context.Context, opts *TriggerOptions) error
- type Config
- type Factory
- type NewSubscriberFunc
- type NewSubscriberOptions
- type Plugin
- type Subscriber
- type SubscriberConfig
- type SubscriberProvider
- type TriggerOptions
Constants ¶
View Source
const (
PluginName = "subscribe"
)
Variables ¶
View Source
var (
SubscribePluginProviders = map[string]NewSubscriberFunc{}
)
Functions ¶
func Enqueue ¶
func Enqueue(queue *lane.Deque, id interface{}, workFunc func(id interface{}, args ...interface{}) error, args ...interface{}) error
Enqueue ensures at most n-number of calls to a function are queued up This prevents concurrent calls from queueing up past a certain number typeically 1, and allows for at least 1 call to be queued up if it is made during another call's execution
Types ¶
type Config ¶
type Config struct { Subscribers map[string]*SubscriberConfig `yaml:"subscribers" json:"subscribers"` // contains filtered or unexported fields }
type NewSubscriberFunc ¶
type NewSubscriberFunc func(opts *NewSubscriberOptions) (Subscriber, error)
type NewSubscriberOptions ¶
type NewSubscriberOptions struct { Config *SubscriberConfig Manager *plugins.Manager Logger logging.Logger }
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Reconfigure ¶
Reconfigure
type Subscriber ¶
type SubscriberConfig ¶
type SubscriberConfig struct { Provider string `yaml:"provider" json:"provider"` Topic string `yaml:"topic" json:"topic"` Plugin string `yaml:"plugin" json:"plugin"` Config interface{} `yaml:"config" json:"config"` // contains filtered or unexported fields }
func (*SubscriberConfig) GetName ¶
func (s *SubscriberConfig) GetName() string
type SubscriberProvider ¶
type SubscriberProvider string
Click to show internal directories.
Click to hide internal directories.