Documentation ¶
Index ¶
- Constants
- Variables
- func ListenAndServe(addr string, cacheSize uint) error
- func NewServer() (*grpc.Server, error)
- type Client
- func (c *Client) GetBlock(ctx context.Context, info *pb.BlockInfo, noCache bool) (header *pb.Block, err error)
- func (c *Client) GetConn() *grpc.ClientConn
- func (c *Client) GetFile(ctx context.Context, key string) ([]byte, error)
- func (c *Client) ListHeaderStartAt(ctx context.Context, chainId, env, role string, blockNum int64, count int64, ...) (info []*pb.BlockInfo, err error)
- func (c *Client) PutBlock(ctx context.Context, block *pb.Block) (err error)
- func (c *Client) PutFile(ctx context.Context, key string, buf []byte) error
- func (c *Client) RemoveFiles(ctx context.Context, infos []*pb.BlockInfo) error
- func (c *Client) ResetConn() error
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 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.