Documentation
¶
Index ¶
- type Client
- func (c *Client) Call(method types.Method, params any, result any) error
- func (c *Client) Close() error
- func (c *Client) Collect(errCode int, command, workingDir, errMsg string) (*types.CollectResponse, error)
- func (c *Client) Connect() error
- func (c *Client) DeleteDocument(filepath string) error
- func (c *Client) GenerateParticipantId() (string, error)
- func (c *Client) GetDataDirPath() (string, error)
- func (c *Client) Handle(ctx context.Context, conn *jsonrpc2.Conn, r *jsonrpc2.Request)
- func (c *Client) Handshake() (*types.ServerInfo, error)
- func (c *Client) IsConnected() bool
- func (c *Client) Notify(method types.Method, params any) error
- func (c *Client) ResetLogger() error
- func (c *Client) ResolveDocument(filepath string, content string) error
- func (c *Client) RetrieveDocument(filepath string) (string, error)
- func (c *Client) RetrieveParticipantId() (string, error)
- func (c *Client) SetConn(conn net.Conn)
- func (c *Client) SetDataDirPath(newPath string) error
- func (c *Client) SetId(id int)
- func (c *Client) Shutdown() error
- func (c *Client) SupportedFileExts() []string
- func (c *Client) UpdateDocument(filepath string, content string) error
- type ConnectionState
- type MaxConnRetriesReachedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
HandleFunc rpc.HandlerFunc
SpawnOnMaxReconnect bool
OnReconnect func(int, error) bool
OnSpawnDaemon func()
// contains filtered or unexported fields
}
func Connect ¶
func Connect(addr string, clientType types.ClientType, handlerFunc ...rpc.HandlerFunc) *Client
func NewClient ¶
func NewClient(ctx context.Context, addr string, clientType types.ClientType, handlerFunc ...rpc.HandlerFunc) *Client
func (*Client) DeleteDocument ¶
func (*Client) GenerateParticipantId ¶
func (*Client) GetDataDirPath ¶
func (*Client) IsConnected ¶
func (*Client) ResetLogger ¶
func (*Client) ResolveDocument ¶
func (*Client) RetrieveDocument ¶
func (*Client) RetrieveParticipantId ¶
func (*Client) SetDataDirPath ¶
func (*Client) SupportedFileExts ¶
type ConnectionState ¶
type ConnectionState int
const ( NotConnectedState ConnectionState = 0 ShutdownState ConnectionState = iota ConnectedState ConnectionState = iota InitializedState ConnectionState = iota )
type MaxConnRetriesReachedError ¶
type MaxConnRetriesReachedError struct {
Err error
}
func (*MaxConnRetriesReachedError) Error ¶
func (e *MaxConnRetriesReachedError) Error() string
Click to show internal directories.
Click to hide internal directories.