Documentation ¶
Index ¶
- Variables
- type ClientError
- type Conn
- type Instance
- type Pool
- func (c *Pool) ClientExists(instanceID string) bool
- func (c *Pool) Close()
- func (c *Pool) DeleteClient(instanceID string) error
- func (c *Pool) GetClient(instanceID string) (*Instance, error)
- func (c *Pool) GetClients() map[string]*Instance
- func (c *Pool) NewClient(instance *Instance) error
- func (c *Pool) Start()
- func (c *Pool) StartClient(instanceID string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClientAlreadyExists = errors.New("")
)
Functions ¶
This section is empty.
Types ¶
type ClientError ¶
func (ClientError) Error ¶
func (ce ClientError) Error() string
type Instance ¶
type Instance struct { ID string sync.Mutex LastMessages *structures.Queue Pool pool // contains filtered or unexported fields }
Instance type which is a client
func (*Instance) SendMessage ¶
func (i *Instance) SendMessage()
type Pool ¶
A pool of clients
func (*Pool) ClientExists ¶
Check if a client exists in the pool using the client id
func (*Pool) DeleteClient ¶
Delete a client from the pool
func (*Pool) GetClients ¶
Get all clients in a pool
Click to show internal directories.
Click to hide internal directories.