Documentation ¶
Index ¶
- func NewMockMercuryDataProducer(trigger *triggers.MercuryTriggerService, lggr logger.Logger) *mockMercuryDataProducer
- func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry core.CapabilitiesRegistry, ...) *registrySyncer
- type Registry
- func (r *Registry) Add(ctx context.Context, c capabilities.BaseCapability) error
- func (r *Registry) Get(_ context.Context, id string) (capabilities.BaseCapability, error)
- func (r *Registry) GetAction(ctx context.Context, id string) (capabilities.ActionCapability, error)
- func (r *Registry) GetConsensus(ctx context.Context, id string) (capabilities.ConsensusCapability, error)
- func (r *Registry) GetTarget(ctx context.Context, id string) (capabilities.TargetCapability, error)
- func (r *Registry) GetTrigger(ctx context.Context, id string) (capabilities.TriggerCapability, error)
- func (r *Registry) List(_ context.Context) ([]capabilities.BaseCapability, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockMercuryDataProducer ¶ added in v2.12.0
func NewMockMercuryDataProducer(trigger *triggers.MercuryTriggerService, lggr logger.Logger) *mockMercuryDataProducer
func NewRegistrySyncer ¶ added in v2.11.0
func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry core.CapabilitiesRegistry, dispatcher remotetypes.Dispatcher, lggr logger.Logger) *registrySyncer
RegistrySyncer updates local Registry to match its onchain counterpart
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a struct for the registry of capabilities. Registry is safe for concurrent use.
func NewRegistry ¶
NewRegistry returns a new Registry.
func (*Registry) Add ¶
func (r *Registry) Add(ctx context.Context, c capabilities.BaseCapability) error
Add adds a capability to the registry.
func (*Registry) Get ¶
func (r *Registry) Get(_ context.Context, id string) (capabilities.BaseCapability, error)
Get gets a capability from the registry.
func (*Registry) GetAction ¶
func (r *Registry) GetAction(ctx context.Context, id string) (capabilities.ActionCapability, error)
GetAction gets a capability from the registry and tries to coerce it to the ActionCapability interface.
func (*Registry) GetConsensus ¶
func (r *Registry) GetConsensus(ctx context.Context, id string) (capabilities.ConsensusCapability, error)
GetConsensus gets a capability from the registry and tries to coerce it to the ConsensusCapability interface.
func (*Registry) GetTarget ¶
func (r *Registry) GetTarget(ctx context.Context, id string) (capabilities.TargetCapability, error)
GetTarget gets a capability from the registry and tries to coerce it to the TargetCapability interface.
func (*Registry) GetTrigger ¶
func (r *Registry) GetTrigger(ctx context.Context, id string) (capabilities.TriggerCapability, error)
GetTrigger gets a capability from the registry and tries to coerce it to the TriggerCapability interface.
func (*Registry) List ¶
func (r *Registry) List(_ context.Context) ([]capabilities.BaseCapability, error)
List lists all the capabilities in the registry.