kbgitkbfs1

package
v2.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrefetchStatusMap = map[string]PrefetchStatus{
	"NO_PREFETCH":        0,
	"TRIGGERED_PREFETCH": 1,
	"FINISHED_PREFETCH":  2,
}
View Source
var PrefetchStatusRevMap = map[PrefetchStatus]string{
	0: "NO_PREFETCH",
	1: "TRIGGERED_PREFETCH",
	2: "FINISHED_PREFETCH",
}

Functions

func DiskBlockCacheProtocol

func DiskBlockCacheProtocol(i DiskBlockCacheInterface) rpc.Protocol

Types

type DeleteBlocksArg

type DeleteBlocksArg struct {
	BlockIDs [][]byte `codec:"blockIDs" json:"blockIDs"`
}

type DeleteBlocksRes

type DeleteBlocksRes struct {
	NumRemoved  int   `codec:"numRemoved" json:"numRemoved"`
	SizeRemoved int64 `codec:"sizeRemoved" json:"sizeRemoved"`
}

DeleteBlocksRes is the response from DeleteBlocks.

func (DeleteBlocksRes) DeepCopy

func (o DeleteBlocksRes) DeepCopy() DeleteBlocksRes

type DiskBlockCacheClient

type DiskBlockCacheClient struct {
	Cli rpc.GenericClient
}

func (DiskBlockCacheClient) DeleteBlocks

func (c DiskBlockCacheClient) DeleteBlocks(ctx context.Context, blockIDs [][]byte) (res DeleteBlocksRes, err error)

DeleteBlocks deletes a set of blocks from the disk cache.

func (DiskBlockCacheClient) GetBlock

func (c DiskBlockCacheClient) GetBlock(ctx context.Context, __arg GetBlockArg) (res GetBlockRes, err error)

GetBlock gets a block from the disk cache.

func (DiskBlockCacheClient) PutBlock

func (c DiskBlockCacheClient) PutBlock(ctx context.Context, __arg PutBlockArg) (err error)

PutBlock puts a block into the disk cache.

func (DiskBlockCacheClient) UpdateBlockMetadata

func (c DiskBlockCacheClient) UpdateBlockMetadata(ctx context.Context, __arg UpdateBlockMetadataArg) (err error)

UpdateBlockMetadata updates the metadata for a block in the disk cache.

type DiskBlockCacheInterface

type DiskBlockCacheInterface interface {
	// GetBlock gets a block from the disk cache.
	GetBlock(context.Context, GetBlockArg) (GetBlockRes, error)
	// PutBlock puts a block into the disk cache.
	PutBlock(context.Context, PutBlockArg) error
	// DeleteBlocks deletes a set of blocks from the disk cache.
	DeleteBlocks(context.Context, [][]byte) (DeleteBlocksRes, error)
	// UpdateBlockMetadata updates the metadata for a block in the disk cache.
	UpdateBlockMetadata(context.Context, UpdateBlockMetadataArg) error
}

DiskBlockCacheInterface specifies how to access a disk cache remotely.

type GetBlockArg

type GetBlockArg struct {
	TlfID   []byte `codec:"tlfID" json:"tlfID"`
	BlockID []byte `codec:"blockID" json:"blockID"`
}

type GetBlockRes

type GetBlockRes struct {
	Buf            []byte         `codec:"buf" json:"buf"`
	ServerHalf     []byte         `codec:"serverHalf" json:"serverHalf"`
	PrefetchStatus PrefetchStatus `codec:"prefetchStatus" json:"prefetchStatus"`
}

GetCachedBlockRes is the response from GetBlock.

func (GetBlockRes) DeepCopy

func (o GetBlockRes) DeepCopy() GetBlockRes

type PrefetchStatus

type PrefetchStatus int
const (
	PrefetchStatus_NO_PREFETCH        PrefetchStatus = 0
	PrefetchStatus_TRIGGERED_PREFETCH PrefetchStatus = 1
	PrefetchStatus_FINISHED_PREFETCH  PrefetchStatus = 2
)

func (PrefetchStatus) DeepCopy

func (o PrefetchStatus) DeepCopy() PrefetchStatus

func (PrefetchStatus) String

func (e PrefetchStatus) String() string

type PutBlockArg

type PutBlockArg struct {
	TlfID      []byte `codec:"tlfID" json:"tlfID"`
	BlockID    []byte `codec:"blockID" json:"blockID"`
	Buf        []byte `codec:"buf" json:"buf"`
	ServerHalf []byte `codec:"serverHalf" json:"serverHalf"`
}

type UpdateBlockMetadataArg

type UpdateBlockMetadataArg struct {
	BlockID        []byte         `codec:"blockID" json:"blockID"`
	PrefetchStatus PrefetchStatus `codec:"prefetchStatus" json:"prefetchStatus"`
}

Jump to

Keyboard shortcuts

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