s3

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BucketName = "prod-blockchain-replicator"
	ChunkSize  = 1 << 22
	Region     = "ap-northeast-1"
)

Variables

View Source
var MaxCacheSize uint = 256

Functions

func ListenAndServe

func ListenAndServe(addr string, cacheSize uint) error

func NewServer

func NewServer() (*grpc.Server, error)

Types

type Client

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

func NewClient

func NewClient(addr string) (*Client, error)

func (*Client) GetBlock

func (c *Client) GetBlock(ctx context.Context, info *pb.BlockInfo, noCache bool) (header *pb.Block, err error)

func (*Client) GetConn

func (c *Client) GetConn() *grpc.ClientConn

func (*Client) GetFile

func (c *Client) GetFile(ctx context.Context, key string) ([]byte, error)

func (*Client) ListHeaderStartAt

func (c *Client) ListHeaderStartAt(ctx context.Context, chainId, env, role string, blockNum int64, count int64, after int64) (info []*pb.BlockInfo, err error)

func (*Client) PutBlock

func (c *Client) PutBlock(ctx context.Context, block *pb.Block) (err error)

func (*Client) PutFile

func (c *Client) PutFile(ctx context.Context, key string, buf []byte) error

func (*Client) RemoveFiles

func (c *Client) RemoveFiles(ctx context.Context, infos []*pb.BlockInfo) error

func (*Client) ResetConn

func (c *Client) ResetConn() error

Jump to

Keyboard shortcuts

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