session

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package session This file is the hub of the `session` package. The `Client` struct defined here manages the database connection has the responsibility of interpreting user inputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient added in v4.1.1

type APIClient interface {
	// PrintConnectInfo prints connection information to stdout.
	PrintConnectInfo()
	// Create creates a new bucket in the marketstore server
	Create(reqs *frontend.MultiCreateRequest, responses *frontend.MultiServerResponse) error
	// Write executes a write operation to the marketstore server.
	Write(reqs *frontend.MultiWriteRequest, responses *frontend.MultiServerResponse) error
	// Destroy deletes a bucket from the marketstore server.
	Destroy(reqs *frontend.MultiKeyRequest, responses *frontend.MultiServerResponse) error
	// ProcessShow returns data stored in the marketstore server.
	Show(tbk *dbio.TimeBucketKey, start, end *time.Time) (csm dbio.ColumnSeriesMap, err error)
	// GetBucketInfo returns information(datashape, timeframe, record type, etc.) for the specified buckets.
	GetBucketInfo(reqs *frontend.MultiKeyRequest, responses *frontend.MultiGetInfoResponse) error
	// SQL executes the specified sql statement
	SQL(line string) (cs *dbio.ColumnSeries, err error)
}

type Client

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

func NewClient added in v4.1.1

func NewClient(ac APIClient) *Client

func (*Client) GetBucketInfo

func (c *Client) GetBucketInfo(key *io.TimeBucketKey) (resp *frontend.GetInfoResponse, err error)

func (*Client) Read

func (c *Client) Read() error

Read kicks off the buffer reading process.

type LocalAPIClient added in v4.1.1

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

func NewLocalAPIClient added in v4.1.1

func NewLocalAPIClient(dir string) (lc *LocalAPIClient, err error)

NewLocalAPIClient builds a new client struct in local mode.

func (*LocalAPIClient) Create added in v4.1.1

func (*LocalAPIClient) Destroy added in v4.1.1

func (*LocalAPIClient) GetBucketInfo added in v4.1.1

func (lc *LocalAPIClient) GetBucketInfo(reqs *frontend.MultiKeyRequest, responses *frontend.MultiGetInfoResponse,
) error

func (*LocalAPIClient) PrintConnectInfo added in v4.1.1

func (lc *LocalAPIClient) PrintConnectInfo()

func (*LocalAPIClient) SQL added in v4.1.1

func (lc *LocalAPIClient) SQL(line string) (cs *io.ColumnSeries, err error)

func (*LocalAPIClient) Show added in v4.1.1

func (lc *LocalAPIClient) Show(tbk *io.TimeBucketKey, start, end *time.Time,
) (csm io.ColumnSeriesMap, err error)

func (*LocalAPIClient) Write added in v4.1.1

type RPCClient added in v4.1.1

type RPCClient interface {
	DoRPC(functionName string, args interface{}) (response interface{}, err error)
}

RPCClient is a marketstore API client interface.

type RemoteAPIClient added in v4.1.1

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

RemoteAPIClient represents an agent that manages a database connection and parses/executes the statements specified by a user in a command-line buffer.

func NewRemoteAPIClient added in v4.1.1

func NewRemoteAPIClient(url string, client RPCClient) *RemoteAPIClient

NewRemoteAPIClient generates a new client struct.

func (*RemoteAPIClient) Create added in v4.1.1

func (*RemoteAPIClient) Destroy added in v4.1.1

func (*RemoteAPIClient) GetBucketInfo added in v4.1.1

func (rc *RemoteAPIClient) GetBucketInfo(reqs *frontend.MultiKeyRequest, responses *frontend.MultiGetInfoResponse,
) error

func (*RemoteAPIClient) PrintConnectInfo added in v4.1.1

func (rc *RemoteAPIClient) PrintConnectInfo()

func (*RemoteAPIClient) SQL added in v4.1.1

func (rc *RemoteAPIClient) SQL(line string) (cs *io.ColumnSeries, err error)

func (*RemoteAPIClient) Show added in v4.1.1

func (rc *RemoteAPIClient) Show(tbk *io.TimeBucketKey, start, end *time.Time) (csm io.ColumnSeriesMap, err error)

func (*RemoteAPIClient) Write added in v4.1.1

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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