Documentation ¶
Index ¶
- Variables
- type Client
- type ClientOpts
- type ClientPool
- type Conn
- func (c *Conn) AddEventHandler(h SpeakerEventHandler)
- func (c *Conn) Connect() error
- func (c *Conn) Flush()
- func (c *Conn) GetAddrPort() (string, int)
- func (c *Conn) GetClientProtocol() Protocol
- func (c *Conn) GetHeaders() http.Header
- func (c *Conn) GetHost() string
- func (c *Conn) GetRemoteHost() string
- func (c *Conn) GetRemoteServiceType() common.ServiceType
- func (c *Conn) GetServiceType() common.ServiceType
- func (c *Conn) GetStatus() ConnStatus
- func (c *Conn) GetURL() *url.URL
- func (c *Conn) IsConnected() bool
- func (c *Conn) Run()
- func (c *Conn) SendMessage(m Message) error
- func (c *Conn) SendRaw(b []byte) error
- func (c *Conn) Start()
- func (c *Conn) Stop()
- func (c *Conn) StopAndWait()
- type ConnState
- type ConnStatus
- type DefaultSpeakerEventHandler
- type Format
- type IncomerHandler
- type MasterElection
- type MasterEventHandler
- type Message
- type Pool
- func (s *Pool) AddClient(c Speaker) error
- func (s *Pool) AddEventHandler(h SpeakerEventHandler)
- func (s *Pool) BroadcastMessage(m Message)
- func (s *Pool) DisconnectAll()
- func (s *Pool) GetName() string
- func (s *Pool) GetSpeakerByRemoteHost(host string) Speaker
- func (s *Pool) GetSpeakers() (speakers []Speaker)
- func (s *Pool) GetSpeakersByType(serviceType common.ServiceType) (speakers []Speaker)
- func (s *Pool) GetStatus() map[string]ConnStatus
- func (s *Pool) OnConnected(c Speaker)
- func (s *Pool) OnDisconnected(c Speaker)
- func (s *Pool) OnMessage(c Speaker, m Message)
- func (s *Pool) PickConnectedSpeaker() Speaker
- func (s *Pool) RemoveClient(c Speaker) bool
- func (s *Pool) SendMessageTo(m Message, host string) error
- func (s *Pool) Start()
- func (s *Pool) Stop()
- type PoolOpts
- type ProtobufObject
- type Protocol
- type RawMessage
- type Server
- type ServerOpts
- type Speaker
- type SpeakerEventHandler
- type SpeakerPool
- type SpeakerStructMessageDispatcher
- type SpeakerStructMessageHandler
- type StructClientPool
- func (s *StructClientPool) AddClient(c Speaker) error
- func (d StructClientPool) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
- func (d StructClientPool) AddStructSpeaker(c *StructSpeaker)
- func (s *StructClientPool) Request(host string, request *StructMessage, timeout time.Duration) (*StructMessage, error)
- type StructMessage
- func (g *StructMessage) Bytes(protocol Protocol) ([]byte, error)
- func (g *StructMessage) Debug() string
- func (*StructMessage) Descriptor() ([]byte, []int)
- func (m *StructMessage) GetFormat() Format
- func (m *StructMessage) GetNamespace() string
- func (m *StructMessage) GetObj() []byte
- func (m *StructMessage) GetStatus() int64
- func (m *StructMessage) GetType() string
- func (m *StructMessage) GetUUID() string
- func (m *StructMessage) Marshal() (dAtA []byte, err error)
- func (m *StructMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *StructMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StructMessage) ProtoMessage()
- func (m *StructMessage) ProtoSize() (n int)
- func (g *StructMessage) Reply(v interface{}, kind string, status int) *StructMessage
- func (m *StructMessage) Reset()
- func (m *StructMessage) String() string
- func (m *StructMessage) Unmarshal(dAtA []byte) error
- func (g *StructMessage) UnmarshalJSON(b []byte) error
- func (m *StructMessage) XXX_DiscardUnknown()
- func (m *StructMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StructMessage) XXX_Merge(src proto.Message)
- func (m *StructMessage) XXX_Size() int
- func (m *StructMessage) XXX_Unmarshal(b []byte) error
- type StructServer
- func (s StructServer) AddClient(c Speaker) error
- func (d StructServer) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
- func (d StructServer) AddStructSpeaker(c *StructSpeaker)
- func (s *StructServer) OnConnected(c Speaker)
- func (s *StructServer) OnDisconnected(c Speaker)
- func (s *StructServer) OnMessage(c Speaker, m Message)
- func (s *StructServer) Request(host string, request *StructMessage, timeout time.Duration) (*StructMessage, error)
- type StructSpeaker
- func (a StructSpeaker) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
- func (a StructSpeaker) OnConnected(c Speaker)
- func (a StructSpeaker) OnDisconnected(c Speaker)
- func (s *StructSpeaker) OnMessage(c Speaker, m Message)
- func (s *StructSpeaker) Request(m *StructMessage, timeout time.Duration) (*StructMessage, error)
- func (s *StructSpeaker) SendMessage(m Message) error
- type StructSpeakerPool
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthStructmessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStructmessage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupStructmessage = fmt.Errorf("proto: unexpected end of group") )
var DefaultRequestTimeout = 10 * time.Second
DefaultRequestTimeout default timeout used for Request/Reply JSON message.
var Format_name = map[int32]string{
0: "Json",
1: "Protobuf",
}
var Format_value = map[string]int32{
"Json": 0,
"Protobuf": 1,
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *Conn Path string AuthOpts *shttp.AuthenticationOpts TLSConfig *tls.Config Opts ClientOpts }
Client is a outgoint client meaning a client connected to a remote websocket server. It embeds a Conn.
func NewClient ¶
func NewClient(host string, clientType common.ServiceType, url *url.URL, opts ClientOpts) *Client
NewClient returns a Client with a new connection.
func (*Client) Start ¶ added in v0.21.0
func (c *Client) Start()
Start connects to the server - and reconnect if necessary
func (*Client) UpgradeToStructSpeaker ¶
func (c *Client) UpgradeToStructSpeaker() *StructSpeaker
UpgradeToStructSpeaker a WebSocket client to a StructSpeaker
type ClientOpts ¶ added in v0.22.0
type ClientOpts struct { Protocol Protocol AuthOpts *shttp.AuthenticationOpts Headers http.Header QueueSize int WriteCompression bool TLSConfig *tls.Config Logger logging.Logger }
ClientOpts defines some options that can be set when creating a new client
type ClientPool ¶
type ClientPool struct {
*Pool
}
ClientPool is a pool of out going Speaker meaning connection to a remote Server.
func NewClientPool ¶
func NewClientPool(name string, opts PoolOpts) *ClientPool
NewClientPool returns a new ClientPool meaning a pool of outgoing Client.
func (*ClientPool) ConnectAll ¶
func (s *ClientPool) ConnectAll()
ConnectAll calls connect to all the wSSpeakers of the pool.
type Conn ¶
type Conn struct { common.RWMutex ConnStatus // contains filtered or unexported fields }
Conn is the connection object of a Speaker
func (*Conn) AddEventHandler ¶
func (c *Conn) AddEventHandler(h SpeakerEventHandler)
AddEventHandler registers a new event handler
func (*Conn) Connect ¶
Connect default implementation doing nothing as for incoming connection it is not used.
func (*Conn) GetAddrPort ¶
GetAddrPort returns the address and the port of the remote end.
func (*Conn) GetClientProtocol ¶
GetClientProtocol returns the websocket protocol.
func (*Conn) GetHeaders ¶
GetHeaders returns the client HTTP headers.
func (*Conn) GetRemoteHost ¶
GetRemoteHost returns the hostname/host-id of the remote side of the connection.
func (*Conn) GetRemoteServiceType ¶
func (c *Conn) GetRemoteServiceType() common.ServiceType
GetRemoteServiceType returns the remote service type.
func (*Conn) GetServiceType ¶
func (c *Conn) GetServiceType() common.ServiceType
GetServiceType returns the client type.
func (*Conn) GetStatus ¶
func (c *Conn) GetStatus() ConnStatus
GetStatus returns the status of a WebSocket connection
func (*Conn) IsConnected ¶
IsConnected returns the connection status.
func (*Conn) SendMessage ¶
SendMessage adds a message to sending queue.
func (*Conn) StopAndWait ¶ added in v0.23.0
func (c *Conn) StopAndWait()
StopAndWait disconnect the speaker and wait for the goroutine to end
type ConnState ¶
type ConnState common.ServiceState
ConnState describes the connection state
func (*ConnState) CompareAndSwap ¶ added in v0.25.0
func (s *ConnState) CompareAndSwap(old, new common.ServiceState) bool
CompareAndSwap executes the compare-and-swap operation for a state
func (*ConnState) Load ¶ added in v0.25.0
func (s *ConnState) Load() common.ServiceState
Load atomatically loads and returns the state
func (*ConnState) MarshalJSON ¶
MarshalJSON marshal the connection state to JSON
func (*ConnState) Store ¶ added in v0.25.0
func (s *ConnState) Store(state common.ServiceState)
Store atomatically stores the state
func (*ConnState) UnmarshalJSON ¶
UnmarshalJSON de-serialize a connection state
type ConnStatus ¶
type ConnStatus struct { ServiceType common.ServiceType ClientProtocol Protocol Addr string Port int Host string `json:"-"` State *ConnState `json:"IsConnected"` URL *url.URL `json:"-"` Headers http.Header `json:"-"` ConnectTime time.Time RemoteHost string `json:",omitempty"` RemoteServiceType common.ServiceType `json:",omitempty"` }
ConnStatus describes the status of a WebSocket connection
type DefaultSpeakerEventHandler ¶
type DefaultSpeakerEventHandler struct { }
DefaultSpeakerEventHandler implements stubs for the wsIncomingClientEventHandler interface
func (*DefaultSpeakerEventHandler) OnConnected ¶
func (d *DefaultSpeakerEventHandler) OnConnected(c Speaker)
OnConnected is called when the connection is established.
func (*DefaultSpeakerEventHandler) OnDisconnected ¶
func (d *DefaultSpeakerEventHandler) OnDisconnected(c Speaker)
OnDisconnected is called when the connection is closed or lost.
func (*DefaultSpeakerEventHandler) OnMessage ¶
func (d *DefaultSpeakerEventHandler) OnMessage(c Speaker, m Message)
OnMessage is called when a message is received.
type IncomerHandler ¶
type IncomerHandler func(*websocket.Conn, *auth.AuthenticatedRequest, clientPromoter) (Speaker, error)
IncomerHandler incoming client handler interface.
type MasterElection ¶
type MasterElection struct { common.RWMutex DefaultSpeakerEventHandler // contains filtered or unexported fields }
MasterElection provides a mechanism based on etcd to elect a master from a SpeakerPool.
func NewMasterElection ¶
func NewMasterElection(pool SpeakerPool) *MasterElection
NewMasterElection returns a new MasterElection.
func (*MasterElection) AddEventHandler ¶
func (a *MasterElection) AddEventHandler(eventHandler MasterEventHandler)
AddEventHandler a new MasterEventHandler event handler.
func (*MasterElection) GetMaster ¶
func (a *MasterElection) GetMaster() Speaker
GetMaster returns the current master.
func (*MasterElection) OnConnected ¶
func (a *MasterElection) OnConnected(c Speaker)
OnConnected is triggered when a new Speaker get connected. If no master was elected this Speaker will be chosen as master.
func (*MasterElection) OnDisconnected ¶
func (a *MasterElection) OnDisconnected(c Speaker)
OnDisconnected is triggered when a new Speaker get disconnected. If it was the master a new election is triggered.
func (*MasterElection) SendMessageToMaster ¶
func (a *MasterElection) SendMessageToMaster(m Message)
SendMessageToMaster sends a message to the master.
type MasterEventHandler ¶
type MasterEventHandler interface {
OnNewMaster(c Speaker)
}
MasterEventHandler is the interface to be implemented by master election listeners.
type Pool ¶
Pool is a connection container. It embed a list of Speaker.
func (*Pool) AddEventHandler ¶
func (s *Pool) AddEventHandler(h SpeakerEventHandler)
AddEventHandler registers a new event handler.
func (*Pool) BroadcastMessage ¶
BroadcastMessage broadcasts the given message.
func (*Pool) DisconnectAll ¶
func (s *Pool) DisconnectAll()
DisconnectAll disconnects all the Speaker
func (*Pool) GetSpeakerByRemoteHost ¶
GetSpeakerByRemoteHost returns the Speaker for the given remote host.
func (*Pool) GetSpeakers ¶
GetSpeakers returns the Speakers of the pool.
func (*Pool) GetSpeakersByType ¶
func (s *Pool) GetSpeakersByType(serviceType common.ServiceType) (speakers []Speaker)
GetSpeakersByType returns Speakers matching the given type.
func (*Pool) GetStatus ¶
func (s *Pool) GetStatus() map[string]ConnStatus
GetStatus returns the states of the WebSocket clients
func (*Pool) OnConnected ¶
OnConnected forwards the OnConnected event to event listeners of the pool.
func (*Pool) OnDisconnected ¶
OnDisconnected forwards the OnConnected event to event listeners of the pool.
func (*Pool) PickConnectedSpeaker ¶
PickConnectedSpeaker returns randomly a connected Speaker
func (*Pool) RemoveClient ¶
RemoveClient removes client from the pool
func (*Pool) SendMessageTo ¶
SendMessageTo sends message to Speaker for the given remote host.
type ProtobufObject ¶ added in v0.22.0
ProtobufObject defines an object that can be serialized in protobuf
type Protocol ¶ added in v0.22.0
type Protocol string
Protocol used to transport messages
const ( // WildcardNamespace is the namespace used as wildcard. It is used by listeners to filter callbacks. WildcardNamespace = "*" // RawProtocol is used for raw messages RawProtocol Protocol = "raw" // ProtobufProtocol is used for protobuf encoded messages ProtobufProtocol Protocol = "protobuf" // JSONProtocol is used for JSON encoded messages JSONProtocol Protocol = "json" )
type Server ¶
Server implements a websocket server. It owns a Pool of incoming Speakers.
func NewServer ¶
func NewServer(server *shttp.Server, endpoint string, authBackend shttp.AuthenticationBackend, opts ServerOpts) *Server
NewServer returns a new Server. The given auth backend will validate the credentials
func (Server) OnDisconnected ¶
func (s Server) OnDisconnected(c Speaker)
OnDisconnected forwards the OnConnected event to event listeners of the pool.
type ServerOpts ¶ added in v0.22.0
type ServerOpts struct { WriteCompression bool QueueSize int PingDelay time.Duration PongTimeout time.Duration Logger logging.Logger }
ServerOpts defines server options
type Speaker ¶
type Speaker interface { GetStatus() ConnStatus GetHost() string GetAddrPort() (string, int) GetServiceType() common.ServiceType GetClientProtocol() Protocol GetHeaders() http.Header GetURL() *url.URL IsConnected() bool SendMessage(m Message) error SendRaw(r []byte) error Connect() error Start() Stop() StopAndWait() AddEventHandler(SpeakerEventHandler) GetRemoteHost() string GetRemoteServiceType() common.ServiceType }
Speaker is the interface for a websocket speaking client. It is used for outgoing or incoming connections.
type SpeakerEventHandler ¶
type SpeakerEventHandler interface { OnMessage(c Speaker, m Message) OnConnected(c Speaker) OnDisconnected(c Speaker) }
SpeakerEventHandler is the interface to be implement by the client events listeners.
type SpeakerPool ¶
type SpeakerPool interface { AddClient(c Speaker) error RemoveClient(c Speaker) bool AddEventHandler(h SpeakerEventHandler) GetSpeakers() []Speaker GetSpeakerByRemoteHost(host string) Speaker PickConnectedSpeaker() Speaker BroadcastMessage(m Message) SendMessageTo(m Message, host string) error }
SpeakerPool is the interface that Speaker pools have to implement.
type SpeakerStructMessageDispatcher ¶
type SpeakerStructMessageDispatcher interface {
AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
}
SpeakerStructMessageDispatcher interface is used to dispatch OnStructMessage events.
type SpeakerStructMessageHandler ¶
type SpeakerStructMessageHandler interface {
OnStructMessage(c Speaker, m *StructMessage)
}
SpeakerStructMessageHandler interface used to receive Struct messages.
type StructClientPool ¶
type StructClientPool struct { *ClientPool // contains filtered or unexported fields }
StructClientPool is a ClientPool able to send StructMessage.
func NewStructClientPool ¶
func NewStructClientPool(name string, opts PoolOpts) *StructClientPool
NewStructClientPool returns a new StructClientPool.
func (*StructClientPool) AddClient ¶
func (s *StructClientPool) AddClient(c Speaker) error
AddClient adds a Client to the pool.
func (StructClientPool) AddStructMessageHandler ¶
func (d StructClientPool) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
AddStructMessageHandler adds a new listener for Struct messages.
func (StructClientPool) AddStructSpeaker ¶
func (d StructClientPool) AddStructSpeaker(c *StructSpeaker)
func (*StructClientPool) Request ¶
func (s *StructClientPool) Request(host string, request *StructMessage, timeout time.Duration) (*StructMessage, error)
Request sends a Request Struct message to the Speaker of the given remote host.
type StructMessage ¶
type StructMessage struct { XXX_state structMessageState `json:"-"` Namespace string `protobuf:"bytes,1,opt,name=Namespace,proto3" json:"Namespace,omitempty"` Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` UUID string `protobuf:"bytes,3,opt,name=UUID,proto3" json:"UUID,omitempty"` Status int64 `protobuf:"varint,4,opt,name=Status,proto3" json:"Status,omitempty"` Format Format `protobuf:"varint,5,opt,name=Format,proto3,enum=websocket.Format" json:"Format,omitempty"` Obj []byte `protobuf:"bytes,6,opt,name=Obj,proto3" json:"Obj,omitempty"` }
StructMessage is a Protobuf based message on top of Message. It implements Message interface and can be sent with via a Speaker.
func NewStructMessage ¶
func NewStructMessage(ns string, tp string, v interface{}, uuids ...string) *StructMessage
NewStructMessage creates a new StructMessage with the given namespace, type, value and optionally the UUID.
func (*StructMessage) Bytes ¶
func (g *StructMessage) Bytes(protocol Protocol) ([]byte, error)
Bytes implements the message interface
func (*StructMessage) Debug ¶
func (g *StructMessage) Debug() string
Debug representation of the struct StructMessage
func (*StructMessage) Descriptor ¶ added in v0.26.0
func (*StructMessage) Descriptor() ([]byte, []int)
func (*StructMessage) GetFormat ¶ added in v0.26.0
func (m *StructMessage) GetFormat() Format
func (*StructMessage) GetNamespace ¶ added in v0.26.0
func (m *StructMessage) GetNamespace() string
func (*StructMessage) GetObj ¶ added in v0.26.0
func (m *StructMessage) GetObj() []byte
func (*StructMessage) GetStatus ¶ added in v0.26.0
func (m *StructMessage) GetStatus() int64
func (*StructMessage) GetType ¶ added in v0.26.0
func (m *StructMessage) GetType() string
func (*StructMessage) GetUUID ¶ added in v0.26.0
func (m *StructMessage) GetUUID() string
func (*StructMessage) Marshal ¶ added in v0.26.0
func (m *StructMessage) Marshal() (dAtA []byte, err error)
func (*StructMessage) MarshalTo ¶ added in v0.26.0
func (m *StructMessage) MarshalTo(dAtA []byte) (int, error)
func (*StructMessage) MarshalToSizedBuffer ¶ added in v0.26.0
func (m *StructMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StructMessage) ProtoMessage ¶ added in v0.26.0
func (*StructMessage) ProtoMessage()
func (*StructMessage) ProtoSize ¶ added in v0.26.0
func (m *StructMessage) ProtoSize() (n int)
func (*StructMessage) Reply ¶
func (g *StructMessage) Reply(v interface{}, kind string, status int) *StructMessage
Reply returns a reply message with the given value, type and status. Basically it return a new StructMessage with the correct Namespace and UUID.
func (*StructMessage) Reset ¶ added in v0.26.0
func (m *StructMessage) Reset()
func (*StructMessage) String ¶ added in v0.26.0
func (m *StructMessage) String() string
func (*StructMessage) Unmarshal ¶ added in v0.26.0
func (m *StructMessage) Unmarshal(dAtA []byte) error
func (*StructMessage) UnmarshalJSON ¶ added in v0.26.0
func (g *StructMessage) UnmarshalJSON(b []byte) error
UnmarshalJSON custom unmarshal
func (*StructMessage) XXX_DiscardUnknown ¶ added in v0.26.0
func (m *StructMessage) XXX_DiscardUnknown()
func (*StructMessage) XXX_Marshal ¶ added in v0.26.0
func (m *StructMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StructMessage) XXX_Merge ¶ added in v0.26.0
func (m *StructMessage) XXX_Merge(src proto.Message)
func (*StructMessage) XXX_Size ¶ added in v0.26.0
func (m *StructMessage) XXX_Size() int
func (*StructMessage) XXX_Unmarshal ¶ added in v0.26.0
func (m *StructMessage) XXX_Unmarshal(b []byte) error
type StructServer ¶
type StructServer struct { *Server // contains filtered or unexported fields }
StructServer is a Server able to handle StructSpeaker.
func NewStructServer ¶
func NewStructServer(server *Server) *StructServer
NewStructServer returns a new StructServer
func (StructServer) AddStructMessageHandler ¶
func (d StructServer) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
AddStructMessageHandler adds a new listener for Struct messages.
func (StructServer) AddStructSpeaker ¶
func (d StructServer) AddStructSpeaker(c *StructSpeaker)
func (*StructServer) OnConnected ¶
func (s *StructServer) OnConnected(c Speaker)
OnConnected websocket event.
func (*StructServer) OnDisconnected ¶
func (s *StructServer) OnDisconnected(c Speaker)
OnDisconnected removes the Speaker from the incomer pool.
func (*StructServer) OnMessage ¶
func (s *StructServer) OnMessage(c Speaker, m Message)
OnMessage websocket event.
func (*StructServer) Request ¶
func (s *StructServer) Request(host string, request *StructMessage, timeout time.Duration) (*StructMessage, error)
Request sends a Request Struct message to the Speaker of the given remote host.
type StructSpeaker ¶
type StructSpeaker struct { Speaker // contains filtered or unexported fields }
StructSpeaker is a Speaker able to handle Struct Message and Request/Reply calls.
func (StructSpeaker) AddStructMessageHandler ¶
func (a StructSpeaker) AddStructMessageHandler(h SpeakerStructMessageHandler, namespaces []string)
AddStructMessageHandler adds a new listener for Struct messages.
func (StructSpeaker) OnConnected ¶
func (a StructSpeaker) OnConnected(c Speaker)
OnConnected is implemented here to avoid infinite loop since the default implementation is triggering OnDisconnected too.
func (StructSpeaker) OnDisconnected ¶
func (a StructSpeaker) OnDisconnected(c Speaker)
OnDisconnected is implemented here to avoid infinite loop since the default implementation is triggering OnDisconnected too.
func (*StructSpeaker) OnMessage ¶
func (s *StructSpeaker) OnMessage(c Speaker, m Message)
OnMessage checks that the Message comes from a StructSpeaker. It parses the Struct message and then dispatch the message to the proper listeners according to the namespace.
func (*StructSpeaker) Request ¶
func (s *StructSpeaker) Request(m *StructMessage, timeout time.Duration) (*StructMessage, error)
Request sends a Struct message request waiting for a reply using the given timeout.
func (*StructSpeaker) SendMessage ¶ added in v0.25.0
func (s *StructSpeaker) SendMessage(m Message) error
SendMessage sends a message according to the namespace.
type StructSpeakerPool ¶
type StructSpeakerPool interface { SpeakerPool SpeakerStructMessageDispatcher Request(host string, request *StructMessage, timeout time.Duration) (*StructMessage, error) }
StructSpeakerPool is the interface of a pool of StructSpeakers.