client

package
v0.0.0-...-cea7fe2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectTo

func ConnectTo(url *url.URL) error

ConnectTo func

Types

type Pool

type Pool struct {
	IDs []uuid.UUID
	// contains filtered or unexported fields
}

Pool type to store connected clients

func NewPool

func NewPool() *Pool

NewPool create a new client pool

func (*Pool) Add

func (p *Pool) Add() (uuid.UUID, error)

Add func append a new client into pool

func (*Pool) Delete

func (p *Pool) Delete(id string) (uuid.UUID, error)

Delete func remove client from client pool

func (*Pool) IsExists

func (p *Pool) IsExists(id string) (bool, int)

IsExists check is the given id registered in client pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL