Documentation
¶
Index ¶
- Variables
- func GetMasterConnection(ctx context.Context, tlsConfig *tls.Config, etcdClient *etcd.Client, ...) (*grpc.ClientConn, error)
- func SplitTablePath(path string) (instance string, table string, err error)
- type DataAccessClient
- func (d *DataAccessClient) Get(parentCtx context.Context, req *redcloud.GetRequest, opts ...grpc.CallOption) (*redcloud.Column, error)
- func (d *DataAccessClient) GetRange(parentCtx context.Context, req *redcloud.GetRangeRequest, ...) error
- func (d *DataAccessClient) Insert(parentCtx context.Context, req *redcloud.InsertRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
var ErrNoDataNodes = errors.New(
"No data nodes could be found for the requested range")
ErrNoDataNodes indicates that no data nodes could be found covering the requested range.
Functions ¶
Types ¶
type DataAccessClient ¶
type DataAccessClient struct {
// contains filtered or unexported fields
}
DataAccessClient is a client library allowing users to have convenient access to data stored in red-cloud without having to implement data node discovery and other related algorithms.
func NewDataAccessClient ¶
func NewDataAccessClient( instance string, etcdClient *etcd.Client, tlsConfig *tls.Config) *DataAccessClient
NewDataAccessClient creates a new DataAccessClient.
func (*DataAccessClient) Get ¶
func (d *DataAccessClient) Get( parentCtx context.Context, req *redcloud.GetRequest, opts ...grpc.CallOption) (*redcloud.Column, error)
Get requests the latest version of a single key of data from the specified column path (table, row, column family, column).
func (*DataAccessClient) GetRange ¶
func (d *DataAccessClient) GetRange( parentCtx context.Context, req *redcloud.GetRangeRequest, resp chan *redcloud.ColumnSet, opts ...grpc.CallOption) error
GetRange requests all versions of a key range of data from the specified column paths (table, row, column family, columns).
func (*DataAccessClient) Insert ¶
func (d *DataAccessClient) Insert( parentCtx context.Context, req *redcloud.InsertRequest, opts ...grpc.CallOption) error
Insert requests to place a new version of a column into the database. The destination of the column must be specified as a (table, row, column family, column) tuple.