Documentation
¶
Index ¶
- func Invoke[TRequest any, TResult any](req TRequest) (TResult, error)
- func Register[TRequest any, TResult any](fcall RequestHandler[TRequest, TResult]) error
- type AMIClient
- func (ami *AMIClient) Close()
- func (ami *AMIClient) CoreSettings(ctx context.Context, actionID string, node *amitools.Node) (*responses.ResponseData, error)
- func (ami *AMIClient) GetNats() *nats.Conn
- func (ami *AMIClient) GetNode() *amitools.Node
- func (ami *AMIClient) GetNodeByIP(ip string) *amitools.Node
- func (ami *AMIClient) GetNodes() map[string]*amitools.Node
- func (ami *AMIClient) Listen(ctx context.Context) error
- func (s *AMIClient) SetAmiRequestHandler(fcall AMIRequestHandler)
- func (ami *AMIClient) Subjects(topic string, id string) string
- func (ami *AMIClient) Subscribe(evt *amitools.Event, node *amitools.Node, cb nats.MsgHandler) (*nats.Subscription, error)
- func (ami *AMIClient) UnSubscribe(sub *nats.Subscription) error
- type AMIRequestHandler
- type OptionFunc
- type Options
- type RequestHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AMIClient ¶ added in v1.0.2
type AMIClient struct {
// List of natsubjects the system will process
Node *amitools.Node
// MBPrefix is the string which should be prepended to all Nats subjects, sending and receiving.
// It defaults to "ami.".
MBPrefix string
//TopicSeparator is the string which we use btw topics to all Nats Subjects, sending and receiving.
TopicSeparator string
// MBPrefix is the string which should be add to the end to all Nats subjects, sending and receiving.
// It defaults to ".*".
MBPostfix string
// contains filtered or unexported fields
}
func NewAmiClient ¶ added in v1.0.2
func NewAmiClient(ctx context.Context, opts ...OptionFunc) *AMIClient
func (*AMIClient) CoreSettings ¶ added in v1.0.2
func (*AMIClient) GetNodeByIP ¶ added in v1.0.3
func (*AMIClient) SetAmiRequestHandler ¶ added in v1.0.3
func (s *AMIClient) SetAmiRequestHandler(fcall AMIRequestHandler)
func (*AMIClient) Subscribe ¶ added in v1.0.3
func (ami *AMIClient) Subscribe(evt *amitools.Event, node *amitools.Node, cb nats.MsgHandler) (*nats.Subscription, error)
func (*AMIClient) UnSubscribe ¶ added in v1.0.3
func (ami *AMIClient) UnSubscribe(sub *nats.Subscription) error
type AMIRequestHandler ¶ added in v1.0.3
type OptionFunc ¶ added in v1.0.2
type OptionFunc func(*AMIClient)
OptionFunc is a function which configures options on a Client
func WithName ¶ added in v1.0.2
func WithName(name string) OptionFunc
func WithNatsUri ¶ added in v1.0.2
func WithNatsUri(uri string) OptionFunc
func WithPrefix ¶ added in v1.0.2
func WithPrefix(prefix string) OptionFunc
func WithType ¶ added in v1.0.3
func WithType(t amitools.NodeType) OptionFunc
type RequestHandler ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.