Documentation ¶
Index ¶
- Constants
- Variables
- func Bootstrap()
- func GetOptions() service.Options
- func NewConnection() (connection.Connection, error)
- func ParseJSONOptions(_ *json.RawMessage) (service.Options, error)
- type Connection
- func (c *Connection) GetConfig() (connection.ConsumerConfig, error)
- func (c *Connection) Reconnect(ctx context.Context, options connection.ConnectOptions) error
- func (c *Connection) Start(ctx context.Context, params connection.ConnectOptions) error
- func (c *Connection) State() <-chan connectionstate.State
- func (c *Connection) Statistics() (connectionstate.Statistics, error)
- func (c *Connection) Stop()
- type Manager
Constants ¶
const ServiceType = "noop"
ServiceType indicates "noop" service type
Variables ¶
var ErrAlreadyStarted = errors.New("service already started")
ErrAlreadyStarted is the error we return when the start is called multiple times
Functions ¶
func Bootstrap ¶
func Bootstrap()
Bootstrap is called on program initialization time and registers various deserializers related to noop service
func GetOptions ¶
GetOptions returns effective Noop service options from application configuration.
func NewConnection ¶
func NewConnection() (connection.Connection, error)
NewConnection creates a new noop connnection
func ParseJSONOptions ¶
func ParseJSONOptions(_ *json.RawMessage) (service.Options, error)
ParseJSONOptions function fills in Noop options from JSON request
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection which does no real tunneling
func (*Connection) GetConfig ¶
func (c *Connection) GetConfig() (connection.ConsumerConfig, error)
GetConfig returns the consumer configuration for session creation
func (*Connection) Reconnect ¶
func (c *Connection) Reconnect(ctx context.Context, options connection.ConnectOptions) error
Reconnect restarts a connection with a new options.
func (*Connection) Start ¶
func (c *Connection) Start(ctx context.Context, params connection.ConnectOptions) error
Start implements the connection.Connection interface
func (*Connection) State ¶
func (c *Connection) State() <-chan connectionstate.State
State returns connection state channel.
func (*Connection) Statistics ¶
func (c *Connection) Statistics() (connectionstate.Statistics, error)
Statistics returns connection statistics channel.
func (*Connection) Stop ¶
func (c *Connection) Stop()
Stop implements the connection.Connection interface
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents entrypoint for Noop service
func (*Manager) ProvideConfig ¶
func (manager *Manager) ProvideConfig(_ string, _ json.RawMessage, _ *net.UDPConn) (*service.ConfigParams, error)
ProvideConfig provides the session configuration