Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataServiceListener ¶ added in v1.0.1
func NewDataServiceListener[T any](options DataServiceListenerOptions[T]) (services.Service, error)
Types ¶
type Connection ¶
type Connection struct {
ConnectionOptions
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(options ConnectionOptions) (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) IsConnected ¶
func (c *Connection) IsConnected() bool
func (*Connection) Subscribe ¶
func (c *Connection) Subscribe(ctx context.Context, options SubscriptionOptions) error
type ConnectionOptions ¶
type ConnectionOptions struct {
Endpoint string
Name string
Logger *zap.SugaredLogger
CredentialsFilePath string
Registerer prometheus.Registerer
}
type DataServiceListener ¶ added in v1.0.1
type DataServiceListener[T any] struct { // contains filtered or unexported fields }
func (*DataServiceListener[T]) Name ¶ added in v1.0.1
func (d *DataServiceListener[T]) Name() string
func (*DataServiceListener[T]) Start ¶ added in v1.0.1
func (d *DataServiceListener[T]) Start() <-chan error
func (*DataServiceListener[T]) Stop ¶ added in v1.0.1
func (d *DataServiceListener[T]) Stop()
type DataServiceListenerOptions ¶ added in v1.0.1
type DataServiceListenerOptions[T any] struct { Name string Kind string Handler func(t events.DataServiceEvent[T]) error BufferSize int WorkerCount int Connection *Connection }
func (DataServiceListenerOptions[T]) Validate ¶ added in v1.0.1
func (t DataServiceListenerOptions[T]) Validate() error
type EventDisposition ¶
type EventDisposition string
const ( EventDispositionAccepted EventDisposition = "accepted" EventDispositionErrored EventDisposition = "errored" EventDispositionIgnored EventDisposition = "ignored" )
type MessageHandler ¶
type MessageHandler func(msg *Msg) (EventDisposition, error)
type SubscriptionOptions ¶
Click to show internal directories.
Click to hide internal directories.