client

package
v0.24.18 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClientIdNone is a client ID for a non-network operations.
	ClientIdNone = ""

	// ClientIdIncoming is a client ID for a request incoming to server.
	ClientIdIncoming = "s"
)
View Source
const (
	ErrDoubleStartIsNotPossible = "double start is not possible"
	ErrDoubleStopIsNotPossible  = "double stop is not possible"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is client.

func NewClient

func NewClient(stn *settings.Settings, id string) (cli *Client, err error)

NewClient creates a client.

func (*Client) CloseConnection_Aux

func (cli *Client) CloseConnection_Aux(normalExit bool) (cerr *ce.CommonError)

CloseConnection_Aux tells the server to close the auxiliary connection. Returns a detailed error.

func (*Client) CloseConnection_Main

func (cli *Client) CloseConnection_Main(normalExit bool) (cerr *ce.CommonError)

CloseConnection_Main tells the server to close the main connection. Returns a detailed error.

func (*Client) ForgetRecord

func (cli *Client) ForgetRecord(uid string) (cerr *ce.CommonError)

ForgetRecord requests the server to remove a data entry from cache. Returns a detailed error.

func (*Client) GetAuxDsn

func (cli *Client) GetAuxDsn() (dsn string)

GetAuxDsn returns the DSN of the auxiliary connection of the client.

func (*Client) GetId

func (cli *Client) GetId() (id string)

GetId returns the ID of the client.

func (*Client) GetMainDsn

func (cli *Client) GetMainDsn() (dsn string)

GetMainDsn returns the DSN of the main connection of the client.

func (*Client) ResetCache

func (cli *Client) ResetCache() (cerr *ce.CommonError)

ResetCache requests the server to remove all entries from cache. Returns a detailed error.

func (*Client) Restart

func (cli *Client) Restart(forcibly bool) (cerr *ce.CommonError)

Restart re-starts the client.

func (*Client) SearchFile

func (cli *Client) SearchFile(uid string) (fileExists bool, cerr *ce.CommonError)

SearchFile asks server to check existence of a file. Returns a detailed error.

func (*Client) SearchRecord

func (cli *Client) SearchRecord(uid string) (recExists bool, cerr *ce.CommonError)

SearchRecord asks server to check existence of a data record in cache. Returns a detailed error.

func (*Client) ShowData

func (cli *Client) ShowData(uid string) (data []byte, cerr *ce.CommonError)

ShowData requests a data record from server and returns it. Returns a detailed error.

func (*Client) Start

func (cli *Client) Start() (cerr *ce.CommonError)

Start starts the client.

func (*Client) Stop

func (cli *Client) Stop() (cerr *ce.CommonError)

Stop stops the client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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