baidu

package
v0.4.23 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIndexClient

func NewIndexClient(c BTSConfig) (chunk.IndexClient, error)

func NewObjectClient

func NewObjectClient(c BOSConfig) (chunk.ObjectClient, error)

NewObjectClient return bos-backed object btsClient.

Types

type BOSClient

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

func (*BOSClient) GetChunks

func (client *BOSClient) GetChunks(ctx context.Context, chunks []chunk.Chunk) ([]chunk.Chunk, error)

GutChunks implements chunk.ObjectClient interface, get chunks parallelly.

func (*BOSClient) PutChunks

func (client *BOSClient) PutChunks(ctx context.Context, chunks []chunk.Chunk) error

PutChunks implements chunk.ObjectClient interface, put chunks parallelly.

func (*BOSClient) Stop

func (client *BOSClient) Stop()

Stop implements chunk.ObjectClient interface.

type BOSConfig

type BOSConfig struct {
	Endpoint  string `yaml:"endpoint"`
	AccessKey string `yaml:"ak"`
	SecretKey string `yaml:"sk"`
	Bucket    string `yaml:"bucket"`
	Prefix    string `yaml:"prefix"`
}

Configuration for Baidu Object Storage (BOS).

type BTSClient

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

func (*BTSClient) BatchWrite

func (c *BTSClient) BatchWrite(ctx context.Context, wb chunk.WriteBatch) error

func (*BTSClient) NewWriteBatch

func (c *BTSClient) NewWriteBatch() chunk.WriteBatch

func (*BTSClient) QueryPages

func (c *BTSClient) QueryPages(ctx context.Context, queries []chunk.IndexQuery, callback func(chunk.IndexQuery, chunk.ReadBatch) (shouldContinue bool)) error

func (*BTSClient) Stop

func (c *BTSClient) Stop()

Stop implements chunk.IndexClient interface.

type BTSConfig

type BTSConfig struct {
	Endpoint  string `yaml:"endpoint"`
	AccessKey string `yaml:"ak"`
	SecretKey string `yaml:"sk"`
	Instance  string `yaml:"instance"`
	Table     string `yaml:"table"`
}

Configuration for Baidu Table Storage (BTS).

Jump to

Keyboard shortcuts

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