Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Configurer ¶
type Pool ¶
type Pool interface {
// Workers returns worker list associated with the pool.
Workers() (workers []*worker.Process)
// Exec payload
Exec(ctx context.Context, p *payload.Payload) (*payload.Payload, error)
// Reset kill all workers inside the watcher and replaces with new
Reset(ctx context.Context) error
// Destroy all underlying stack (but let them complete the task).
Destroy(ctx context.Context)
}
type PubSub ¶
type PubSub interface {
Publisher
Subscriber
Reader
}
type Publisher ¶
type Publisher interface {
// Publish one or multiple Channel.
Publish(Message) error
// PublishAsync publish message and return immediately
// If error occurred it will be printed into the logger
PublishAsync(Message)
}
Publisher publish one or more messages BETA interface
type Server ¶
type Server interface {
NewPool(ctx context.Context, cfg *pool.Config, env map[string]string, _ *zap.Logger) (*staticPool.Pool, error)
}
Server creates workers for the application.
type SubReader ¶
type SubReader interface {
Subscriber
Reader
}
type Subscriber ¶
type Subscriber interface {
// Subscribe broker to one or multiple topics.
Subscribe(connectionID string, topics ...string) error
// Unsubscribe from one or multiply topics
Unsubscribe(connectionID string, topics ...string) error
// Connections returns all connections associated with the particular topic
Connections(topic string, ret map[string]struct{})
// Stop used to stop the driver and free up the connection
Stop()
}
Subscriber defines the ability to operate as message passing broker. BETA interface
Click to show internal directories.
Click to hide internal directories.