fossil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Open(proto.ConnectionString, uint) error
	Close() error
	Send(proto.Message) (proto.Message, error)
	Append(string, []byte) error
	Query(string) (database.Entries, error)
}

func NewClient

func NewClient(connstr string) (Client, error)

NewClient creates a new Client struct which can be used to interact with a remote fossil database. The client is thread safe, but only holds one connection at a time. For a client pool, use NewClientPool instead.

func NewClientPool

func NewClientPool(connstr string, size uint) (Client, error)

NewClientPool creates a new Client struct which holds a pool of net.Conn resources open to a remote fossil database. This is useful for sending large volumes of data to fossil.

type LocalClient added in v0.2.0

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

func (*LocalClient) Append added in v0.2.0

func (client *LocalClient) Append(topic string, data []byte) error

func (*LocalClient) Close added in v0.2.0

func (client *LocalClient) Close() error

func (*LocalClient) Open added in v0.2.0

func (client *LocalClient) Open(target proto.ConnectionString, _ uint) error

func (*LocalClient) Query added in v0.2.0

func (client *LocalClient) Query(q string) (database.Entries, error)

func (*LocalClient) Send added in v0.2.0

func (client *LocalClient) Send(message proto.Message) (proto.Message, error)

type RemoteClient added in v0.2.0

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

A RemoteClient holds the data needed to interact with a fossil database.

func (*RemoteClient) Append added in v0.2.0

func (client *RemoteClient) Append(topic string, data []byte) error

Append data to the specified topic.

func (*RemoteClient) Close added in v0.2.0

func (client *RemoteClient) Close() error

func (*RemoteClient) Open added in v0.2.0

func (client *RemoteClient) Open(connectionString proto.ConnectionString, size uint) error

func (*RemoteClient) Query added in v0.2.0

func (client *RemoteClient) Query(q string) (database.Entries, error)

Query the database for some time-series data.

func (*RemoteClient) Send added in v0.2.0

func (client *RemoteClient) Send(m proto.Message) (proto.Message, error)

Send a general message to the fossil server.

Jump to

Keyboard shortcuts

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