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 ¶
- type APIClient
- type Client
- type LocalAPIClient
- func (lc *LocalAPIClient) Create(reqs *frontend.MultiCreateRequest, responses *frontend.MultiServerResponse) error
- func (lc *LocalAPIClient) Destroy(reqs *frontend.MultiKeyRequest, responses *frontend.MultiServerResponse) error
- func (lc *LocalAPIClient) GetBucketInfo(reqs *frontend.MultiKeyRequest, responses *frontend.MultiGetInfoResponse) error
- func (lc *LocalAPIClient) PrintConnectInfo()
- func (lc *LocalAPIClient) SQL(line string) (cs *io.ColumnSeries, err error)
- func (lc *LocalAPIClient) Show(tbk *io.TimeBucketKey, start, end *time.Time) (csm io.ColumnSeriesMap, err error)
- func (lc *LocalAPIClient) Write(reqs *frontend.MultiWriteRequest, responses *frontend.MultiServerResponse) error
- type RPCClient
- type RemoteAPIClient
- func (rc *RemoteAPIClient) Create(reqs *frontend.MultiCreateRequest, responses *frontend.MultiServerResponse) error
- func (rc *RemoteAPIClient) Destroy(reqs *frontend.MultiKeyRequest, responses *frontend.MultiServerResponse) error
- func (rc *RemoteAPIClient) GetBucketInfo(reqs *frontend.MultiKeyRequest, responses *frontend.MultiGetInfoResponse) error
- func (rc *RemoteAPIClient) PrintConnectInfo()
- func (rc *RemoteAPIClient) SQL(line string) (cs *io.ColumnSeries, err error)
- func (rc *RemoteAPIClient) Show(tbk *io.TimeBucketKey, start, end *time.Time) (csm io.ColumnSeriesMap, err error)
- func (rc *RemoteAPIClient) Write(reqs *frontend.MultiWriteRequest, responses *frontend.MultiServerResponse) error
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 (*Client) GetBucketInfo ¶
func (c *Client) GetBucketInfo(key *io.TimeBucketKey) (resp *frontend.GetInfoResponse, err error)
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 (lc *LocalAPIClient) Create(reqs *frontend.MultiCreateRequest, responses *frontend.MultiServerResponse) error
func (*LocalAPIClient) Destroy ¶ added in v4.1.1
func (lc *LocalAPIClient) Destroy(reqs *frontend.MultiKeyRequest, responses *frontend.MultiServerResponse) error
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
func (lc *LocalAPIClient) Write(reqs *frontend.MultiWriteRequest, responses *frontend.MultiServerResponse) error
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 (rc *RemoteAPIClient) Create(reqs *frontend.MultiCreateRequest, responses *frontend.MultiServerResponse) error
func (*RemoteAPIClient) Destroy ¶ added in v4.1.1
func (rc *RemoteAPIClient) Destroy(reqs *frontend.MultiKeyRequest, responses *frontend.MultiServerResponse) error
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
func (rc *RemoteAPIClient) Write(reqs *frontend.MultiWriteRequest, responses *frontend.MultiServerResponse) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.