stor

package
v1.1.0-alpha-8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: Apache-2.0 Imports: 13 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client defines the 0-stor client

func NewClient

func NewClient(conf Config) (*Client, error)

NewClient creates new client from the given config

func (*Client) Close

func (c *Client) Close() error

func (*Client) LastHash

func (c *Client) LastHash() []byte

func (*Client) ProcessStore

func (c *Client) ProcessStore(blocks []*schema.TlogBlock) ([]byte, error)

ProcessStore processes and then stores the data to 0-stor server

func (*Client) Walk

func (c *Client) Walk(fromEpoch, toEpoch int64) <-chan *WalkResult

Walk walks the history from fromEpoch to toEpoch.

type Config

type Config struct {
	VdiskID         string
	Organization    string
	Namespace       string
	IyoClientID     string
	IyoSecret       string
	ZeroStorShards  []string
	MetaShards      []string
	DataShardsNum   int
	ParityShardsNum int
	EncryptPrivKey  string
}

Config defines the 0-stor client config

func ConfigFromConfigSource

func ConfigFromConfigSource(source config.Source, vdiskID, privKey string, dataShards, parityShards int) (conf Config, err error)

type MetaClient

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

func NewMetaClient

func NewMetaClient(endpoints []string) (*MetaClient, error)

func (*MetaClient) Close

func (cli *MetaClient) Close() error

func (*MetaClient) GetMeta

func (cli *MetaClient) GetMeta(key []byte) ([]byte, error)

func (*MetaClient) SaveMeta

func (cli *MetaClient) SaveMeta(key, val []byte) error

type WalkResult

type WalkResult struct {
	Agg *schema.TlogAggregation
	Err error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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