client

package
v0.0.0-...-c4c90f7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryDatum

func BinaryDatum(val []byte) *table.Datum

func BinaryValue

func BinaryValue(datum *table.Datum) []byte

func BoolDatum

func BoolDatum(val bool) *table.Datum

func BoolValue

func BoolValue(datum *table.Datum) bool

func Float32Datum

func Float32Datum(val float32) *table.Datum

func Float32Value

func Float32Value(datum *table.Datum) float32

func Float64Datum

func Float64Datum(val float64) *table.Datum

func Float64Value

func Float64Value(datum *table.Datum) float64

func Int16Datum

func Int16Datum(val int16) *table.Datum

func Int16Value

func Int16Value(datum *table.Datum) int16

func Int32Datum

func Int32Datum(val int32) *table.Datum

func Int32Value

func Int32Value(datum *table.Datum) int32

func Int64Datum

func Int64Datum(val int64) *table.Datum

func Int64Value

func Int64Value(datum *table.Datum) int64

func Int8Datum

func Int8Datum(val int8) *table.Datum

func Int8Value

func Int8Value(datum *table.Datum) int8

func RawbinaryDatum

func RawbinaryDatum(val []byte) *table.Datum

func StringDatum

func StringDatum(val string) *table.Datum

func StringValue

func StringValue(datum *table.Datum) string

Types

type AdminClientProxy

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

////////////////////////// Admin client proxy //////////////////////////

func (*AdminClientProxy) AlterTable

func (p *AdminClientProxy) AlterTable(tableName string, tableSpec *table.TableSpec) (err error)

func (*AdminClientProxy) CancelSnapshotTable

func (p *AdminClientProxy) CancelSnapshotTable(tableName string, snapshotName string) (err error)

func (*AdminClientProxy) CloneTable

func (p *AdminClientProxy) CloneTable(srcName string, destTable string,
	flushTable bool) (err error)

func (*AdminClientProxy) CreateTable

func (p *AdminClientProxy) CreateTable(tableName string,
	tableSpec *table.TableSpec) (r *table.TableInfo, err error)

func (*AdminClientProxy) DeleteSnapshot

func (p *AdminClientProxy) DeleteSnapshot(tableName string, snapshotName string) (err error)

func (*AdminClientProxy) DescribeTable

func (p *AdminClientProxy) DescribeTable(tableName string) (r *table.TableSpec, err error)

func (*AdminClientProxy) DisableTable

func (p *AdminClientProxy) DisableTable(tableName string) (err error)

func (*AdminClientProxy) DropTable

func (p *AdminClientProxy) DropTable(tableName string) (err error)

func (*AdminClientProxy) EnableTable

func (p *AdminClientProxy) EnableTable(tableName string) (err error)

func (*AdminClientProxy) FindAllAppInfo

func (p *AdminClientProxy) FindAllAppInfo() (r []*admin.AppInfo, err error)

func (*AdminClientProxy) FindAllApps

func (p *AdminClientProxy) FindAllApps() (r []*admin.AppInfo, err error)

func (*AdminClientProxy) FindAllTables

func (p *AdminClientProxy) FindAllTables() (r []*table.TableInfo, err error)

func (*AdminClientProxy) GetAppInfo

func (p *AdminClientProxy) GetAppInfo(appId string) (r *admin.AppInfo, err error)

func (*AdminClientProxy) GetCeilStreamCheckpoint

func (p *AdminClientProxy) GetCeilStreamCheckpoint(tableName string, topicName string, timestamp int64) (r *admin.StreamCheckpoint, err error)

func (*AdminClientProxy) GetDefaultColdStandBy

func (p *AdminClientProxy) GetDefaultColdStandBy() (r *table.ColdStandBy, err error)

func (*AdminClientProxy) GetDevelopId

func (p *AdminClientProxy) GetDevelopId() (r string, err error)

func (*AdminClientProxy) GetFloorStreamCheckpoint

func (p *AdminClientProxy) GetFloorStreamCheckpoint(tableName string, topicName string, timestamp int64) (r *admin.StreamCheckpoint, err error)

func (*AdminClientProxy) GetGrantRule

func (p *AdminClientProxy) GetGrantRule(spaceId string) (r *admin.GrantRule, err error)

func (*AdminClientProxy) GetIndexTableSplits

func (p *AdminClientProxy) GetIndexTableSplits(tableName string, indexName string, startKey table.Dictionary, stopKey table.Dictionary) (r []*table.TableSplit, err error)

func (*AdminClientProxy) GetLatestStreamCheckpoint

func (p *AdminClientProxy) GetLatestStreamCheckpoint(tableName string, topicName string) (r *admin.StreamCheckpoint, err error)

func (*AdminClientProxy) GetQuotaInfo

func (p *AdminClientProxy) GetQuotaInfo(spaceId string) (r *admin.QuotaInfo, err error)

func (*AdminClientProxy) GetServerTime

func (p *AdminClientProxy) GetServerTime() (r int64, err error)

func (*AdminClientProxy) GetServerVersion

func (p *AdminClientProxy) GetServerVersion() (r *common.Version, err error)

func (*AdminClientProxy) GetSnapshotState

func (p *AdminClientProxy) GetSnapshotState(tableName string, snapshotName string) (r table.SnapshotState, err error)

func (*AdminClientProxy) GetTableHistorySize

func (p *AdminClientProxy) GetTableHistorySize(tableName string, startDate int64, stopDate int64) (r map[int64]int64, err error)

func (*AdminClientProxy) GetTableSize

func (p *AdminClientProxy) GetTableSize(tableName string) (r int64, err error)

func (*AdminClientProxy) GetTableSplits

func (p *AdminClientProxy) GetTableSplits(tableName string, startKey table.Dictionary,
	stopKey table.Dictionary) (r []*table.TableSplit, err error)

func (*AdminClientProxy) GetTableState

func (p *AdminClientProxy) GetTableState(tableName string) (r table.TableState, err error)

func (*AdminClientProxy) GetTableStatus

func (p *AdminClientProxy) GetTableStatus(tableName string) (r *table.TableStatus, err error)

func (*AdminClientProxy) ListAllDeletedTables

func (p *AdminClientProxy) ListAllDeletedTables(spaceId string) (r []*table.TableInfo, err error)

func (*AdminClientProxy) ListAllSnapshots

func (p *AdminClientProxy) ListAllSnapshots(spaceId string) (r []*admin.SnapshotTableView, err error)

func (*AdminClientProxy) ListSnapshots

func (p *AdminClientProxy) ListSnapshots(tableName string) (r *admin.TableSnapshots, err error)

func (*AdminClientProxy) ListSubscribedEmail

func (p *AdminClientProxy) ListSubscribedEmail(spaceId string) (r []string, err error)

func (*AdminClientProxy) ListSubscribedPhone

func (p *AdminClientProxy) ListSubscribedPhone(spaceId string) (r []string, err error)

func (*AdminClientProxy) PutClientMetrics

func (p *AdminClientProxy) PutClientMetrics(clientMetrics *admin.ClientMetrics) (err error)

func (*AdminClientProxy) QueryMetric

func (p *AdminClientProxy) QueryMetric(query *admin.MetricQueryRequest) (r *admin.TimeSeriesData,
	err error)

func (*AdminClientProxy) QueryMetrics

func (p *AdminClientProxy) QueryMetrics(queries []*admin.MetricQueryRequest) (r []*admin.TimeSeriesData, err error)

func (*AdminClientProxy) RecoverTable

func (p *AdminClientProxy) RecoverTable(srcTableName string, destTableName string, topicName string, timestamp int64) (err error)

func (*AdminClientProxy) RenameTable

func (p *AdminClientProxy) RenameTable(srcName string, destName string) (err error)

func (*AdminClientProxy) RestoreSnapshot

func (p *AdminClientProxy) RestoreSnapshot(tableName string, snapshotName string, destTableName string, isSystem table.SnapshotType) (err error)

func (*AdminClientProxy) RestoreTable

func (p *AdminClientProxy) RestoreTable(deletedTableName string, destTableName string) (err error)

func (*AdminClientProxy) SaveAppInfo

func (p *AdminClientProxy) SaveAppInfo(appInfo *admin.AppInfo) (err error)

func (*AdminClientProxy) SetGrantRule

func (p *AdminClientProxy) SetGrantRule(spaceId string, grantRule *admin.GrantRule) (err error)

func (*AdminClientProxy) SetSpaceId

func (p *AdminClientProxy) SetSpaceId(tableName string, spaceId string) (err error)

func (*AdminClientProxy) SnapshotTable

func (p *AdminClientProxy) SnapshotTable(tableName string, snapshotName string) (err error)

func (*AdminClientProxy) SubscribeEmailAlert

func (p *AdminClientProxy) SubscribeEmailAlert(email string, spaceId string) (err error)

func (*AdminClientProxy) SubscribePhoneAlert

func (p *AdminClientProxy) SubscribePhoneAlert(phoneNumber string, spaceId string) (err error)

func (*AdminClientProxy) UnsubscribeEmailAlert

func (p *AdminClientProxy) UnsubscribeEmailAlert(email string, spaceId string) (err error)

func (*AdminClientProxy) UnsubscribePhoneAlert

func (p *AdminClientProxy) UnsubscribePhoneAlert(phoneNumber string, spaceId string) (err error)

func (*AdminClientProxy) ValidateClientVersion

func (p *AdminClientProxy) ValidateClientVersion(clientVersion *common.Version) (err error)

type ClientFactory

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

func NewClientFactory

func NewClientFactory(credential *auth.Credential, soTimeout time.Duration) ClientFactory

func (*ClientFactory) NewAdminClient

func (cf *ClientFactory) NewAdminClient(url string) admin.AdminService

func (*ClientFactory) NewDefaultAdminClient

func (cf *ClientFactory) NewDefaultAdminClient() admin.AdminService

func (*ClientFactory) NewDefaultSecureAdminClient

func (cf *ClientFactory) NewDefaultSecureAdminClient() admin.AdminService

func (*ClientFactory) NewDefaultSecureTableClient

func (cf *ClientFactory) NewDefaultSecureTableClient() table.TableService

func (*ClientFactory) NewDefaultTableClient

func (cf *ClientFactory) NewDefaultTableClient() table.TableService

func (*ClientFactory) NewTableClient

func (cf *ClientFactory) NewTableClient(url string) table.TableService

func (*ClientFactory) SetHTTPClient

func (cf *ClientFactory) SetHTTPClient(client *http.Client)

type ScannedItem

type ScannedItem struct {
	Datum map[string]*table.Datum
	Error error
}

type SdsErrorCodePeeker

type SdsErrorCodePeeker interface {
	GetErrorCode() errors.ErrorCode
}

type SdsTHttpClient

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

func (*SdsTHttpClient) Close

func (p *SdsTHttpClient) Close() error

func (*SdsTHttpClient) DelHeader

func (p *SdsTHttpClient) DelHeader(key string)

Deletes the HTTP Header given a Header Key for this specific Thrift Transport It is important that you first assert the TTransport as a SdsTHttpClient type like so:

httpTrans := trans.(SdsTHttpClient) httpTrans.DelHeader("User-Agent")

func (*SdsTHttpClient) Flush

func (p *SdsTHttpClient) Flush() error

func (*SdsTHttpClient) GetHeader

func (p *SdsTHttpClient) GetHeader(key string) string

Get the HTTP Header represented by the supplied Header Key for this specific Thrift Transport It is important that you first assert the TTransport as a SdsTHttpClient type like so:

httpTrans := trans.(SdsTHttpClient) hdrValue := httpTrans.GetHeader("User-Agent")

func (*SdsTHttpClient) IsOpen

func (p *SdsTHttpClient) IsOpen() bool

func (*SdsTHttpClient) Open

func (p *SdsTHttpClient) Open() error

func (*SdsTHttpClient) Peek

func (p *SdsTHttpClient) Peek() bool

func (*SdsTHttpClient) Read

func (p *SdsTHttpClient) Read(buf []byte) (int, error)

func (*SdsTHttpClient) ReadByte

func (p *SdsTHttpClient) ReadByte() (c byte, err error)

func (*SdsTHttpClient) SetHeader

func (p *SdsTHttpClient) SetHeader(key string, value string)

Set the HTTP Header for this specific Thrift Transport It is important that you first assert the TTransport as a SdsTHttpClient type like so:

httpTrans := trans.(SdsTHttpClient) httpTrans.SetHeader("User-Agent","Thrift Client 1.0")

func (*SdsTHttpClient) Write

func (p *SdsTHttpClient) Write(buf []byte) (int, error)

func (*SdsTHttpClient) WriteByte

func (p *SdsTHttpClient) WriteByte(c byte) error

func (*SdsTHttpClient) WriteString

func (p *SdsTHttpClient) WriteString(s string) (n int, err error)

type SdsTHttpClientTransportFactory

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

func NewTHttpClientTransportFactory

func NewTHttpClientTransportFactory(url string, credential *auth.Credential,
	httpClient *http.Client, agent string) *SdsTHttpClientTransportFactory

func (*SdsTHttpClientTransportFactory) GetTransport

func (*SdsTHttpClientTransportFactory) GetTransportWithClockOffset

func (p *SdsTHttpClientTransportFactory) GetTransportWithClockOffset(trans thrift.TTransport,
	clockOffset int64, query string) thrift.TTransport

type SdsTransportError

type SdsTransportError struct {
	HttpStatusCode errors.HttpStatusCode
	ErrorCode      errors.ErrorCode
	ErrorMessage   string
	ServerTime     int64
}

func NewSdsTransportError

func NewSdsTransportError(httpStatusCode errors.HttpStatusCode,
	errorMessage string, timestamp int64) *SdsTransportError

func (*SdsTransportError) Error

func (p *SdsTransportError) Error() string

func (*SdsTransportError) GetErrorCode

func (p *SdsTransportError) GetErrorCode() errors.ErrorCode

func (*SdsTransportError) String

func (p *SdsTransportError) String() string

type TableClientProxy

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

////////////////////////// Table client proxy //////////////////////////

func (*TableClientProxy) Batch

func (p *TableClientProxy) Batch(request *table.BatchRequest) (r *table.BatchResult_, err error)

func (*TableClientProxy) BatchCheckAndMutate

func (p *TableClientProxy) BatchCheckAndMutate(request *table.BatchRequest) (r *table.BatchResult_, err error)

func (*TableClientProxy) Get

func (p *TableClientProxy) Get(request *table.GetRequest) (r *table.GetResult_, err error)

func (*TableClientProxy) GetServerTime

func (p *TableClientProxy) GetServerTime() (r int64, err error)

func (*TableClientProxy) GetServerVersion

func (p *TableClientProxy) GetServerVersion() (r *common.Version, err error)

func (*TableClientProxy) Increment

func (p *TableClientProxy) Increment(request *table.IncrementRequest) (r *table.IncrementResult_,
	err error)

func (*TableClientProxy) PartialAllowedBatch

func (p *TableClientProxy) PartialAllowedBatch(request *table.BatchRequest) (r *table.BatchResult_, err error)

func (*TableClientProxy) Put

func (p *TableClientProxy) Put(request *table.PutRequest) (r *table.PutResult_, err error)

func (*TableClientProxy) PutToRebuildIndex

func (p *TableClientProxy) PutToRebuildIndex(request *table.PutRequest) (r *table.PutResult_, err error)

func (*TableClientProxy) RealRemove

func (p *TableClientProxy) RealRemove(request []*table.RemoveRequest) (r []*table.RemoveResult_,
	err error)

func (*TableClientProxy) Remove

func (p *TableClientProxy) Remove(request *table.RemoveRequest) (r *table.RemoveResult_,
	err error)

func (*TableClientProxy) Scan

func (p *TableClientProxy) Scan(request *table.ScanRequest) (r *table.ScanResult_, err error)

func (*TableClientProxy) ValidateClientVersion

func (p *TableClientProxy) ValidateClientVersion(clientVersion *common.Version) (err error)

type TableScanner

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

func NewTableScanner

func NewTableScanner(client table.TableService, scan *table.ScanRequest) *TableScanner

func (*TableScanner) Iter

func (p *TableScanner) Iter() <-chan *ScannedItem

This will end up with data copies and synchronizations, however we are IO bounded

Jump to

Keyboard shortcuts

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