fossil

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: BSD-2-Clause Imports: 8 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 struct {
	// contains filtered or unexported fields
}

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

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.

func (*Client) Append

func (c *Client) Append(topic string, data []byte) error

Append data to the specified topic.

func (*Client) Close

func (c *Client) Close() error

func (*Client) Query

func (c *Client) Query(q string) (database.Entries, error)

Query the database for some time-series data.

func (*Client) Send

func (c *Client) 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