Documentation
¶
Index ¶
- Constants
- Variables
- func DialWithTimeout(ctx context.Context, addr string) (net.Conn, error)
- func GenerateFsID(name string) string
- func GetLogger() *logger
- func GetPrivateIpAddr() (string, error)
- func GetPublicIpAddr() (string, error)
- func InitLogger(debugMode bool, prettyLogs bool)
- func Mount(ctx context.Context, opts FSSystemOpts) (func() error, <-chan error, *fuse.Server, error)
- func SHA1StringToUint64(hash string) (uint64, error)
- func ToSlice(v interface{}) []interface{}
- func ToStruct(m map[string]string, out interface{}) error
- func WithClientName(name string) func(*redis.UniversalOptions)
- type BufferPool
- type CacheFS
- type CacheFSNode
- type CacheMetadataStore
- type CacheMetrics
- type Client
- func NewClient(ctx context.Context, cfg Config) (*Client, error)
- func NewClientWithHostDirectory(ctx context.Context, cfg Config, metadataStore CacheMetadataStore, ...) (*Client, error)
- func NewClientWithMetadataStore(ctx context.Context, cfg Config, metadataStore CacheMetadataStore, ...) (*Client, error)
- func (c *Client) AttachLocalServer(server *Server)
- func (c *Client) AttachLocalStore(store *Store)
- func (c *Client) CacheFSMetadata(ctx context.Context, path string) (*FSMetadata, error)
- func (c *Client) Cleanup() error
- func (c *Client) ClientLocalPageFileView(hash string, offset int64, length int64, opts ClientOptions) (path string, pageOffset int64, n int, ok bool, err error)
- func (c *Client) ClientLocalPageFileViews(hash string, offset int64, length int64, opts ClientOptions) (views []ClientLocalPageFileView, err error)
- func (c *Client) DetachLocalServer(hostID string)
- func (c *Client) GetContent(hash string, offset int64, length int64, opts struct{ ... }) ([]byte, error)
- func (c *Client) GetContentStream(hash string, offset int64, length int64, opts struct{ ... }) (chan []byte, error)
- func (c *Client) GetNearbyHosts() ([]*Host, error)
- func (c *Client) GetState() error
- func (c *Client) HostsAvailable() bool
- func (c *Client) IsCachedNearby(hash string, routingKey string) (bool, error)
- func (c *Client) IsPathCachedNearby(ctx context.Context, path string) bool
- func (c *Client) ReadContentInto(ctx context.Context, hash string, offset int64, dst []byte, opts ClientOptions) (read int64, err error)
- func (c *Client) StoreContent(chunks chan []byte, hash string, opts struct{ ... }) (string, error)
- func (c *Client) StoreContentAtPath(content []byte, cachePath string, opts StoreContentOptions) (string, error)
- func (c *Client) StoreContentFromFUSE(source struct{ ... }, opts struct{ ... }) (string, error)
- func (c *Client) StoreContentFromLocalFile(source LocalContentSource, opts StoreContentOptions) (string, error)
- func (c *Client) StoreContentFromLocalPath(source struct{ ... }, opts struct{ ... }) (string, error)
- func (c *Client) StoreContentFromLocalSource(source LocalContentSource, opts StoreContentOptions) (string, error)
- func (c *Client) StoreContentFromS3(source struct{ ... }, opts struct{ ... }) (string, error)
- func (c *Client) StoreContentFromS3Source(source S3ContentSource, opts StoreContentOptions) (string, error)
- func (c *Client) StoreContentWithLocalReplica(chunks chan []byte, hash string, opts StoreContentOptions) (string, error)
- func (c *Client) WaitForHosts(timeout time.Duration) error
- type ClientConfig
- type ClientLocalPageFileView
- type ClientOptions
- type ClientReadTransportConfig
- type ClientRequest
- type ClientRequestType
- type Config
- type Coordinator
- func (c *Coordinator) ListHosts(ctx context.Context, poolName, locality string) ([]CoordinatorHost, error)
- func (c *Coordinator) RegisterHost(ctx context.Context, host CoordinatorHost, ttl time.Duration) error
- func (c *Coordinator) UnregisterHost(ctx context.Context, poolName, locality, logicalHostID, registrationID string) error
- type CoordinatorConfig
- type CoordinatorHost
- type CoordinatorRepository
- type DiscoveryClient
- type DiskConfig
- type ErrNodeNotFound
- type FSConfig
- type FSMetadata
- type FSNode
- func (n *FSNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *FSNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *FSNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *FSNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *FSNode) OnAdd(ctx context.Context)
- func (n *FSNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *FSNode) Opendir(ctx context.Context) syscall.Errno
- func (n *FSNode) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (n *FSNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *FSNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)
- func (n *FSNode) Rename(ctx context.Context, oldName string, newParent fs.InodeEmbedder, ...) syscall.Errno
- func (n *FSNode) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *FSNode) Unlink(ctx context.Context, name string) syscall.Errno
- type FSSystemOpts
- type FileSystem
- type FileSystemOpts
- type FileSystemStorage
- type GlobalConfig
- type Host
- type HostDirectory
- type HostMap
- func (hm *HostMap) Closest(timeout time.Duration) (*Host, error)
- func (hm *HostMap) ClosestWithCapacity(timeout time.Duration) (*Host, error)
- func (hm *HostMap) Get(hostId string) *Host
- func (hm *HostMap) GetAll() []*Host
- func (hm *HostMap) Members() mapset.Set[string]
- func (hm *HostMap) Remove(host *Host)
- func (hm *HostMap) Set(host *Host)
- type JuiceFSConfig
- type JuiceFsSource
- type LocalContentSource
- type MemoryConfig
- type Metadata
- func (m *Metadata) AddFsNodeChild(ctx context.Context, pid, id string) error
- func (m *Metadata) AddHostToIndex(ctx context.Context, locality string, host *Host) error
- func (m *Metadata) GetAvailableHosts(ctx context.Context, locality string, removeHostCallback func(host *Host)) ([]*Host, error)
- func (m *Metadata) GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
- func (m *Metadata) GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
- func (m *Metadata) GetHostIndex(ctx context.Context, locality string) ([]*Host, error)
- func (m *Metadata) RefreshStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (m *Metadata) RemoveClientLock(ctx context.Context, clientId, hash string) error
- func (m *Metadata) RemoveFsNode(ctx context.Context, id string) error
- func (m *Metadata) RemoveFsNodeChild(ctx context.Context, pid, id string) error
- func (m *Metadata) RemoveHostFromIndex(ctx context.Context, locality string, host *Host) error
- func (m *Metadata) RemoveHostKeepAlive(ctx context.Context, locality string, host *Host) error
- func (m *Metadata) RemoveStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (m *Metadata) SetClientLock(ctx context.Context, clientId, hash string) error
- func (m *Metadata) SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
- func (m *Metadata) SetHostKeepAlive(ctx context.Context, locality string, host *Host) error
- func (m *Metadata) SetStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- type MetadataConfig
- type MetadataMode
- type MetricsConfig
- type MockCacheMetadataStore
- func (m *MockCacheMetadataStore) AddFsNodeChild(ctx context.Context, pid, id string) error
- func (m *MockCacheMetadataStore) AddHostToIndex(ctx context.Context, locality string, host *Host) error
- func (m *MockCacheMetadataStore) GetAvailableHosts(ctx context.Context, locality string) ([]*Host, error)
- func (m *MockCacheMetadataStore) GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
- func (m *MockCacheMetadataStore) GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
- func (m *MockCacheMetadataStore) RefreshStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (m *MockCacheMetadataStore) RemoveClientLock(ctx context.Context, hash string, host string) error
- func (m *MockCacheMetadataStore) RemoveFsNode(ctx context.Context, id string) error
- func (m *MockCacheMetadataStore) RemoveFsNodeChild(ctx context.Context, pid, id string) error
- func (m *MockCacheMetadataStore) RemoveHost(ctx context.Context, locality string, host *Host) error
- func (m *MockCacheMetadataStore) RemoveStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (m *MockCacheMetadataStore) SetClientLock(ctx context.Context, hash string, host string) error
- func (m *MockCacheMetadataStore) SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
- func (m *MockCacheMetadataStore) SetHostKeepAlive(ctx context.Context, locality string, host *Host) error
- func (m *MockCacheMetadataStore) SetStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- type MountPointConfig
- type MountPointSource
- type PrefetchState
- type Prefetcher
- type ReadPrefetchConfig
- type RedisCacheMetadataStore
- func (c *RedisCacheMetadataStore) AddFsNodeChild(ctx context.Context, pid, id string) error
- func (c *RedisCacheMetadataStore) AddHostToIndex(ctx context.Context, locality string, host *Host) error
- func (c *RedisCacheMetadataStore) GetAvailableHosts(ctx context.Context, locality string) ([]*Host, error)
- func (c *RedisCacheMetadataStore) GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
- func (c *RedisCacheMetadataStore) GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
- func (c *RedisCacheMetadataStore) RefreshStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (c *RedisCacheMetadataStore) RemoveClientLock(ctx context.Context, hash string, host string) error
- func (c *RedisCacheMetadataStore) RemoveFsNode(ctx context.Context, id string) error
- func (c *RedisCacheMetadataStore) RemoveFsNodeChild(ctx context.Context, pid, id string) error
- func (c *RedisCacheMetadataStore) RemoveHost(ctx context.Context, locality string, host *Host) error
- func (c *RedisCacheMetadataStore) RemoveStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- func (c *RedisCacheMetadataStore) SetClientLock(ctx context.Context, hash string, host string) error
- func (c *RedisCacheMetadataStore) SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
- func (c *RedisCacheMetadataStore) SetHostKeepAlive(ctx context.Context, locality string, host *Host) error
- func (c *RedisCacheMetadataStore) SetStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
- type RedisClient
- func (r *RedisClient) Keys(ctx context.Context, pattern string) ([]string, error)
- func (r *RedisClient) LRange(ctx context.Context, key string, start, stop int64) ([]string, error)
- func (r *RedisClient) PSubscribe(ctx context.Context, channels ...string) (<-chan *redis.Message, <-chan error, func())
- func (r *RedisClient) Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd
- func (r *RedisClient) Scan(ctx context.Context, pattern string) ([]string, error)
- func (r *RedisClient) Subscribe(ctx context.Context, channels ...string) (<-chan *redis.Message, <-chan error)
- func (r *RedisClient) ToSlice(v interface{}) []interface{}
- func (r *RedisClient) ToStruct(m map[string]string, out interface{}) error
- type RedisConfig
- type RedisLock
- type RedisLockOption
- type RedisLockOptions
- type RedisMode
- type RendezvousHasher
- type S3Client
- func (c *S3Client) BucketName() string
- func (c *S3Client) DownloadIntoBuffer(ctx context.Context, key string, buffer *bytes.Buffer) error
- func (c *S3Client) GetClient() *s3.Client
- func (c *S3Client) Head(ctx context.Context, key string) (bool, *s3.HeadObjectOutput, error)
- func (c *S3Client) Open(ctx context.Context, key string) (io.ReadCloser, error)
- type S3ContentSource
- type S3SourceConfig
- type Server
- func (cs *Server) Close() error
- func (cs *Server) Drain()
- func (cs *Server) GetContent(ctx context.Context, req *proto.CacheGetContentRequest) (*proto.CacheGetContentResponse, error)
- func (cs *Server) GetContentStream(req *proto.CacheGetContentRequest, stream proto.Cache_GetContentStreamServer) error
- func (cs *Server) GetState(ctx context.Context, req *proto.CacheGetStateRequest) (*proto.CacheGetStateResponse, error)
- func (cs *Server) HasContent(ctx context.Context, req *proto.CacheHasContentRequest) (*proto.CacheHasContentResponse, error)
- func (cs *Server) Host() *Host
- func (cs *Server) Serve(bindAddr string, advertiseHost string) (string, error)
- func (cs *Server) StartServer(port uint) error
- func (cs *Server) StoreContent(stream proto.Cache_StoreContentServer) error
- func (cs *Server) StoreContentFromSource(ctx context.Context, req *proto.CacheStoreContentFromSourceRequest) (*proto.CacheStoreContentFromSourceResponse, error)
- func (cs *Server) StoreContentFromSourceWithLock(ctx context.Context, req *proto.CacheStoreContentFromSourceRequest) (*proto.CacheStoreContentFromSourceWithLockResponse, error)
- func (cs *Server) StoreContentInCacheFS(ctx context.Context, path string, hash string, size uint64) error
- func (cs *Server) StoreSyntheticContentInCacheFS(ctx context.Context, path string, hash string, size uint64) error
- func (cs *Server) UsagePct() float64
- type ServerConfig
- type ServerOption
- type ServerOpts
- type ServerReadTransportConfig
- type Source
- type SourceConfig
- type StorageLayer
- type Store
- func (cas *Store) Add(ctx context.Context, hash string, content []byte) error
- func (cas *Store) AddReader(ctx context.Context, reader io.Reader) (string, int64, error)
- func (cas *Store) Cleanup()
- func (cas *Store) Exists(hash string) bool
- func (cas *Store) Get(hash string, offset, length int64, dst []byte) (int64, error)
- func (cas *Store) GetDiskCacheMetrics() (int64, int64, float64, error)
- func (cas *Store) PageRegion(hash string, offset int64, length int64) (path string, pageOffset int64, n int, ok bool, err error)
- func (cas *Store) PutFullPages(hash string, offset int64, data []byte)
- func (cas *Store) PutPageRange(hash string, offset int64, data []byte)
- func (cas *Store) ReadAt(hash string, offset int64, dst []byte) (read int64, err error)
- func (cas *Store) WarmRange(hash string, offset int64, length int64)
- type StoreContentOptions
- type ValkeyConfig
- type ValkeyExistingPrimary
Constants ¶
const ( SourceModeJuiceFS string = "juicefs" SourceModeMountPoint string = "mountpoint" )
const ( HostPrefix string = "cache-host" Version string = "dev" )
Variables ¶
var ( BufferSize1MB = 1 * 1024 * 1024 BufferSize4MB = 4 * 1024 * 1024 BufferSize16MB = 16 * 1024 * 1024 )
Standard buffer sizes aligned with typical chunk sizes
var ( ErrInvalidHostRegistration = errors.New("invalid cache host registration") )
var ( ErrHostNotFound = errors.New("host not found") ErrUnableToReachHost = errors.New("unable to reach host") ErrInvalidHostVersion = errors.New("invalid host version") ErrContentNotFound = errors.New("content not found") ErrClientNotFound = errors.New("client not found") ErrCacheLockHeld = errors.New("cache lock held") ErrUnableToPopulateContent = errors.New("unable to populate content from original source") ErrFSMountFailure = errors.New("failed to mount cachefs") ErrUnableToAcquireLock = errors.New("unable to acquire lock") )
var ( ErrChannelClosed = errors.New("redis: channel closed") ErrConnectionIssue = errors.New("redis: connection issue") ErrUnknownRedisMode = errors.New("redis: unknown mode") )
var (
Logger *logger
)
var MetadataKeys = &metadataKeys{}
Functions ¶
func GenerateFsID ¶
Generates a directory ID based on parent ID and name.
func GetPrivateIpAddr ¶
func GetPublicIpAddr ¶
func InitLogger ¶
func SHA1StringToUint64 ¶
SHA1StringToUint64 converts the first 8 bytes of a SHA-1 hash string to a uint64
func ToSlice ¶
func ToSlice(v interface{}) []interface{}
Flattens a struct using its field tags so it can be used by HSet. Struct fields must have the redis tag on them otherwise they will be ignored.
func ToStruct ¶
Copies the result of HGetAll to a provided struct. If a field cannot be parsed, we use Go's default value. Struct fields must have the redis tag on them otherwise they will be ignored.
func WithClientName ¶
func WithClientName(name string) func(*redis.UniversalOptions)
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool provides a pool of reusable byte slices to reduce allocations Optimized for 1-4MB chunks as recommended in the optimization plan
func NewBufferPool ¶
func NewBufferPool() *BufferPool
NewBufferPool creates a new buffer pool with predefined size buckets
func (*BufferPool) Get ¶
func (bp *BufferPool) Get(size int) []byte
Get retrieves a buffer of at least the requested size
type CacheFS ¶
type CacheFS struct {
MetadataStore CacheMetadataStore
Client *Client
Config ClientConfig
// contains filtered or unexported fields
}
func NewFileSystem ¶
func NewFileSystem(ctx context.Context, opts FSSystemOpts) (*CacheFS, error)
NewFileSystem initializes a new CacheFS with root metadata.
type CacheFSNode ¶
type CacheMetadataStore ¶
type CacheMetadataStore interface {
SetClientLock(ctx context.Context, hash string, host string) error
RemoveClientLock(ctx context.Context, hash string, host string) error
SetStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
RemoveStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
RefreshStoreFromContentLock(ctx context.Context, locality string, sourcePath string) error
SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
RemoveFsNode(ctx context.Context, id string) error
RemoveFsNodeChild(ctx context.Context, pid, id string) error
GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
AddFsNodeChild(ctx context.Context, pid, id string) error
}
func NewRedisCacheMetadataStore ¶
func NewRedisCacheMetadataStore(_ GlobalConfig, serverConfig ServerConfig) (CacheMetadataStore, error)
func NewRedisCacheMetadataStoreWithClient ¶
func NewRedisCacheMetadataStoreWithClient(_ GlobalConfig, _ ServerConfig, client redis.UniversalClient) CacheMetadataStore
type CacheMetrics ¶
type CacheMetrics struct {
DiskCacheUsageMB *metrics.Histogram
DiskCacheUsagePct *metrics.Histogram
MemCacheUsageMB *metrics.Histogram
MemCacheUsagePct *metrics.Histogram
// Cache tier hit ratios
L0HitRatio *metrics.Histogram // In-memory cache hits
L1HitRatio *metrics.Histogram // Disk cache hits
L2MissRatio *metrics.Histogram // Remote fetch required
// Operation counters
L0Hits *metrics.Counter
L1Hits *metrics.Counter
L2Misses *metrics.Counter
TotalReads *metrics.Counter
// Bytes served per tier
L0BytesServed *metrics.Counter
L1BytesServed *metrics.Counter
L2BytesFetched *metrics.Counter
// FUSE operation latencies
FUSEReadLatency *metrics.Histogram
FUSELookupLatency *metrics.Histogram
FUSEGetattrLatency *metrics.Histogram
// Read throughput
ReadThroughputMBps *metrics.Histogram
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithHostDirectory ¶
func NewClientWithHostDirectory(ctx context.Context, cfg Config, metadataStore CacheMetadataStore, hostDirectory HostDirectory, locality string) (*Client, error)
func (*Client) AttachLocalServer ¶
func (*Client) AttachLocalStore ¶
func (*Client) CacheFSMetadata ¶
CacheFSMetadata resolves a cachefs path to its content metadata without going through the cachefs FUSE mount.
func (*Client) ClientLocalPageFileView ¶
func (*Client) ClientLocalPageFileViews ¶
func (c *Client) ClientLocalPageFileViews(hash string, offset int64, length int64, opts ClientOptions) (views []ClientLocalPageFileView, err error)
func (*Client) DetachLocalServer ¶
func (*Client) GetContent ¶
func (*Client) GetContentStream ¶
func (*Client) GetNearbyHosts ¶
func (*Client) HostsAvailable ¶
func (*Client) IsCachedNearby ¶
func (*Client) IsPathCachedNearby ¶
func (*Client) ReadContentInto ¶
func (*Client) StoreContent ¶
func (*Client) StoreContentAtPath ¶
func (*Client) StoreContentFromFUSE ¶
func (*Client) StoreContentFromLocalFile ¶
func (c *Client) StoreContentFromLocalFile(source LocalContentSource, opts StoreContentOptions) (string, error)
StoreContentFromLocalFile streams a caller-local file to the selected cache host.
func (*Client) StoreContentFromLocalPath ¶
func (*Client) StoreContentFromLocalSource ¶
func (c *Client) StoreContentFromLocalSource(source LocalContentSource, opts StoreContentOptions) (string, error)
StoreContentFromLocalSource asks the selected cache host to read source.Path itself. Prefer StoreContentFromLocalFile unless the source path is guaranteed to exist on cache hosts.
func (*Client) StoreContentFromS3 ¶
func (*Client) StoreContentFromS3Source ¶
func (c *Client) StoreContentFromS3Source(source S3ContentSource, opts StoreContentOptions) (string, error)
func (*Client) StoreContentWithLocalReplica ¶
func (c *Client) StoreContentWithLocalReplica(chunks chan []byte, hash string, opts StoreContentOptions) (string, error)
StoreContentWithLocalReplica tees streamed content into the rendezvous-selected cache host and the writer's local disk cache at the same time. This preserves churn safety without serializing a full second copy.
type ClientConfig ¶
type ClientConfig struct {
Token string `key:"token" json:"token"`
MinRetryLengthBytes int64 `key:"minRetryLengthBytes" json:"min_retry_length_bytes"`
MaxGetContentAttempts int `key:"maxGetContentAttempts" json:"max_get_content_attempts"`
NTopHosts int `key:"nTopHosts" json:"n_top_hosts"`
CacheFS FSConfig `key:"cachefs" json:"cachefs"`
PreferLocalCacheHost bool `key:"preferLocalCacheHost" json:"prefer_local_cache_host"`
PageFDCacheSize int `key:"pageFDCacheSize" json:"page_fd_cache_size"`
ReadTransport ClientReadTransportConfig `key:"readTransport" json:"read_transport"`
Prefetch ReadPrefetchConfig `key:"prefetch" json:"prefetch"`
}
type ClientLocalPageFileView ¶
ClientLocalPageFileView describes a byte range inside a page file that is already present on this client/worker. It is intentionally not a remote address: consumers may mmap it, return it as a FUSE fd-backed response, or otherwise read it as a local file.
type ClientOptions ¶
type ClientOptions = struct {
RoutingKey string
}
type ClientRequest ¶
type ClientRequest struct {
// contains filtered or unexported fields
}
type ClientRequestType ¶
type ClientRequestType int
const ( ClientRequestTypeStorage ClientRequestType = iota ClientRequestTypeRetrieval )
type Config ¶
type Config struct {
Enabled bool `key:"enabled" json:"enabled"`
Disk DiskConfig `key:"disk" json:"disk"`
Memory MemoryConfig `key:"memory" json:"memory"`
Coordinator CoordinatorConfig `key:"coordinator" json:"coordinator"`
Server ServerConfig `key:"server" json:"server"`
Client ClientConfig `key:"client" json:"client"`
Global GlobalConfig `key:"global" json:"global"`
Metrics MetricsConfig `key:"metrics" json:"metrics"`
}
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func NewCoordinator ¶
func NewCoordinator(repository CoordinatorRepository) *Coordinator
func (*Coordinator) ListHosts ¶
func (c *Coordinator) ListHosts(ctx context.Context, poolName, locality string) ([]CoordinatorHost, error)
func (*Coordinator) RegisterHost ¶
func (c *Coordinator) RegisterHost(ctx context.Context, host CoordinatorHost, ttl time.Duration) error
func (*Coordinator) UnregisterHost ¶
func (c *Coordinator) UnregisterHost(ctx context.Context, poolName, locality, logicalHostID, registrationID string) error
type CoordinatorConfig ¶
type CoordinatorConfig struct {
RegistrationTTLSeconds int `key:"registrationTTLSeconds" json:"registration_ttl_seconds"`
HeartbeatIntervalSeconds int `key:"heartbeatIntervalSeconds" json:"heartbeat_interval_seconds"`
HostWatchIntervalSeconds int `key:"hostWatchIntervalSeconds" json:"host_watch_interval_seconds"`
}
type CoordinatorHost ¶
type CoordinatorHost struct {
// LogicalHostID is the stable cache routing identity. Multiple worker
// process registrations can advertise addresses for the same logical host.
LogicalHostID string
// RegistrationID identifies one live worker/cache-server process lease.
RegistrationID string
PoolName string
Locality string
NodeID string
CachePathID string
Addr string
PrivateAddr string
CapacityUsagePct float64
}
type CoordinatorRepository ¶
type CoordinatorRepository interface {
SetCacheRegistration(ctx context.Context, host CoordinatorHost, ttl time.Duration) error
GetActiveCacheRegistration(ctx context.Context, logicalHostID string) (registrationID string, found bool, err error)
SetActiveCacheRegistration(ctx context.Context, logicalHostID, registrationID string, ttl time.Duration) error
ListCacheLogicalHosts(ctx context.Context, poolName, locality string) ([]string, error)
ListCacheRegistrations(ctx context.Context, logicalHostID string) ([]string, error)
GetCacheRegistration(ctx context.Context, logicalHostID, registrationID string) (CoordinatorHost, bool, error)
RemoveCacheRegistration(ctx context.Context, logicalHostID, registrationID string) error
CountCacheRegistrations(ctx context.Context, logicalHostID string) (int64, error)
RemoveCacheLogicalHost(ctx context.Context, poolName, locality, logicalHostID string) error
}
type DiscoveryClient ¶
type DiscoveryClient struct {
// contains filtered or unexported fields
}
func NewDiscoveryClient ¶
func NewDiscoveryClient(cfg GlobalConfig, hostMap *HostMap, hostDirectory HostDirectory, locality string) *DiscoveryClient
func (*DiscoveryClient) GetHostState ¶
GetHostState attempts to connect to the gRPC service and verifies its availability
type DiskConfig ¶
type ErrNodeNotFound ¶
type ErrNodeNotFound struct {
Id string
}
func (*ErrNodeNotFound) Error ¶
func (e *ErrNodeNotFound) Error() string
type FSConfig ¶
type FSConfig struct {
Enabled bool `key:"enabled" json:"enabled"`
MountPoint string `key:"mountPoint" json:"mount_point"`
MaxBackgroundTasks int `key:"maxBackgroundTasks" json:"max_background_tasks"`
MaxWriteKB int `key:"maxWriteKB" json:"max_write_kb"`
MaxReadAheadKB int `key:"maxReadAheadKB" json:"max_read_ahead_kb"`
DirectMount bool `key:"directMount" json:"direct_mount"`
DirectIO bool `key:"directIO" json:"direct_io"`
Options []string `key:"options" json:"options"`
}
type FSMetadata ¶
type FSMetadata struct {
PID string `redis:"pid" json:"pid"`
ID string `redis:"id" json:"id"`
Name string `redis:"name" json:"name"`
Path string `redis:"path" json:"path"`
Hash string `redis:"hash" json:"hash"`
Ino uint64 `redis:"ino" json:"ino"`
Size uint64 `redis:"size" json:"size"`
Blocks uint64 `redis:"blocks" json:"blocks"`
Atime uint64 `redis:"atime" json:"atime"`
Mtime uint64 `redis:"mtime" json:"mtime"`
Ctime uint64 `redis:"ctime" json:"ctime"`
Atimensec uint32 `redis:"atimensec" json:"atimensec"`
Mtimensec uint32 `redis:"mtimensec" json:"mtimensec"`
Ctimensec uint32 `redis:"ctimensec" json:"ctimensec"`
Mode uint32 `redis:"mode" json:"mode"`
Nlink uint32 `redis:"nlink" json:"nlink"`
Rdev uint32 `redis:"rdev" json:"rdev"`
Blksize uint32 `redis:"blksize" json:"blksize"`
Padding uint32 `redis:"padding" json:"padding"`
Uid uint32 `redis:"uid" json:"uid"`
Gid uint32 `redis:"gid" json:"gid"`
Gen uint64 `redis:"gen" json:"gen"`
}
func FSMetadataFromWorkerCacheProto ¶
func FSMetadataFromWorkerCacheProto(metadata *proto.WorkerCacheFSMetadata) *FSMetadata
func (*FSMetadata) ToProto ¶
func (m *FSMetadata) ToProto() *proto.CacheFSMetadata
func (*FSMetadata) ToWorkerCacheProto ¶
func (m *FSMetadata) ToWorkerCacheProto() *proto.WorkerCacheFSMetadata
type FSNode ¶
type FSSystemOpts ¶
type FSSystemOpts struct {
Verbose bool
MetadataStore CacheMetadataStore
Config ClientConfig
Client *Client
}
type FileSystem ¶
type FileSystemOpts ¶
CacheFS types
type FileSystemStorage ¶
type GlobalConfig ¶
type GlobalConfig struct {
DefaultLocality string `key:"defaultLocality" json:"default_locality"`
ServerPort uint `key:"serverPort" json:"server_port"`
DiscoveryIntervalS int `key:"discoveryIntervalS" json:"discovery_interval_s"`
DiscoveryJitterS int `key:"discoveryJitterS" json:"discovery_jitter_s"`
MaxDiscoveryConcurrency int `key:"maxDiscoveryConcurrency" json:"max_discovery_concurrency"`
HostMonitorIntervalS int `key:"hostMonitorIntervalS" json:"host_monitor_interval_s"`
RoundTripThresholdMilliseconds uint `key:"rttThresholdMilliseconds" json:"rtt_threshold_ms"`
HostStorageCapacityThresholdPct float64 `key:"hostStorageCapacityThresholdPct" json:"host_storage_capacity_threshold_pct"`
GRPCDialTimeoutS int `key:"grpcDialTimeoutS" json:"grpc_dial_timeout_s"`
GRPCMessageSizeBytes int `key:"grpcMessageSizeBytes" json:"grpc_message_size_bytes"`
GRPCInitialWindowSize int `key:"grpcInitialWindowSize" json:"grpc_initial_window_size"`
GRPCInitialConnWindowSize int `key:"grpcInitialConnWindowSize" json:"grpc_initial_conn_window_size"`
GRPCWriteBufferSize int `key:"grpcWriteBufferSize" json:"grpc_write_buffer_size"`
GRPCReadBufferSize int `key:"grpcReadBufferSize" json:"grpc_read_buffer_size"`
GRPCMaxConcurrentStreams int `key:"grpcMaxConcurrentStreams" json:"grpc_max_concurrent_streams"`
GRPCNumStreamWorkers int `key:"grpcNumStreamWorkers" json:"grpc_num_stream_workers"`
GRPCPayloadCodecV2 bool `key:"grpcPayloadCodecV2" json:"grpc_payload_codec_v2"`
GRPCPayloadCodecMinBytes int `key:"grpcPayloadCodecMinBytes" json:"grpc_payload_codec_min_bytes"`
DebugMode bool `key:"debugMode" json:"debug_mode"`
PrettyLogs bool `key:"prettyLogs" json:"pretty_logs"`
}
func (*GlobalConfig) GetLocality ¶
func (c *GlobalConfig) GetLocality() string
type Host ¶
type HostDirectory ¶
type HostMap ¶
type HostMap struct {
// contains filtered or unexported fields
}
func NewHostMap ¶
func NewHostMap(cfg GlobalConfig, onHostAdded func(*Host) error) *HostMap
func (*HostMap) Closest ¶
Closest finds the nearest host within a given timeout If no hosts are found, it will error out
func (*HostMap) ClosestWithCapacity ¶
ClosestWithCapacity finds the nearest host with available storage capacity within a given timeout If no hosts are found, it will error out
type JuiceFSConfig ¶
type JuiceFSConfig struct {
RedisURI string `key:"redisURI" json:"redis_uri"`
Bucket string `key:"bucket" json:"bucket"`
AccessKey string `key:"accessKey" json:"access_key"`
SecretKey string `key:"secretKey" json:"secret_key"`
CacheSize int64 `key:"cacheSize" json:"cache_size"`
BlockSize int64 `key:"blockSize" json:"block_size"`
Prefetch int64 `key:"prefetch" json:"prefetch"`
BufferSize int64 `key:"bufferSize" json:"buffer_size"`
}
type JuiceFsSource ¶
type JuiceFsSource struct {
// contains filtered or unexported fields
}
func (*JuiceFsSource) Format ¶
func (s *JuiceFsSource) Format(fsName string) error
func (*JuiceFsSource) Mount ¶
func (s *JuiceFsSource) Mount(localPath string) error
func (*JuiceFsSource) Unmount ¶
func (s *JuiceFsSource) Unmount(localPath string) error
type LocalContentSource ¶
type MemoryConfig ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func NewMetadata ¶
func NewMetadata(cfg MetadataConfig) (*Metadata, error)
func NewMetadataWithRedisClient ¶
func NewMetadataWithRedisClient(client redis.UniversalClient) *Metadata
func (*Metadata) AddFsNodeChild ¶
func (*Metadata) AddHostToIndex ¶
func (*Metadata) GetAvailableHosts ¶
func (*Metadata) GetFsNodeChildren ¶
func (*Metadata) GetHostIndex ¶
func (*Metadata) RefreshStoreFromContentLock ¶
func (*Metadata) RemoveClientLock ¶
func (*Metadata) RemoveFsNode ¶
func (*Metadata) RemoveFsNodeChild ¶
func (*Metadata) RemoveHostFromIndex ¶
func (*Metadata) RemoveHostKeepAlive ¶
func (*Metadata) RemoveStoreFromContentLock ¶
func (*Metadata) SetClientLock ¶
func (*Metadata) SetHostKeepAlive ¶
type MetadataConfig ¶
type MetadataConfig struct {
Mode MetadataMode `key:"mode" json:"mode"`
ValkeyConfig ValkeyConfig `key:"valkey" json:"valkey"`
// Default config
RedisAddr string `key:"redisAddr" json:"redis_addr"`
RedisPasswd string `key:"redisPasswd" json:"redis_passwd"`
RedisTLSEnabled bool `key:"redisTLSEnabled" json:"redis_tls_enabled"`
RedisInsecureSkipVerify bool `key:"redisInsecureSkipVerify" json:"redis_insecure_skip_verify"`
RedisMode RedisMode `key:"redisMode" json:"redis_mode"`
RedisMasterName string `key:"redisMasterName" json:"redis_master_name"`
}
type MetadataMode ¶
type MetadataMode string
const ( MetadataModeDefault MetadataMode = "default" MetadataModeLocal MetadataMode = "local" )
type MetricsConfig ¶
type MockCacheMetadataStore ¶
type MockCacheMetadataStore struct {
// contains filtered or unexported fields
}
MockCacheMetadataStore is a simple in-memory metadataStore for testing Does not require Redis or any external dependencies
func NewMockCacheMetadataStore ¶
func NewMockCacheMetadataStore() *MockCacheMetadataStore
func (*MockCacheMetadataStore) AddFsNodeChild ¶
func (m *MockCacheMetadataStore) AddFsNodeChild(ctx context.Context, pid, id string) error
func (*MockCacheMetadataStore) AddHostToIndex ¶
func (*MockCacheMetadataStore) GetAvailableHosts ¶
func (*MockCacheMetadataStore) GetFsNode ¶
func (m *MockCacheMetadataStore) GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
func (*MockCacheMetadataStore) GetFsNodeChildren ¶
func (m *MockCacheMetadataStore) GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
func (*MockCacheMetadataStore) RefreshStoreFromContentLock ¶
func (*MockCacheMetadataStore) RemoveClientLock ¶
func (*MockCacheMetadataStore) RemoveFsNode ¶
func (m *MockCacheMetadataStore) RemoveFsNode(ctx context.Context, id string) error
func (*MockCacheMetadataStore) RemoveFsNodeChild ¶
func (m *MockCacheMetadataStore) RemoveFsNodeChild(ctx context.Context, pid, id string) error
func (*MockCacheMetadataStore) RemoveHost ¶
func (*MockCacheMetadataStore) RemoveStoreFromContentLock ¶
func (*MockCacheMetadataStore) SetClientLock ¶
func (*MockCacheMetadataStore) SetFsNode ¶
func (m *MockCacheMetadataStore) SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
func (*MockCacheMetadataStore) SetHostKeepAlive ¶
func (*MockCacheMetadataStore) SetStoreFromContentLock ¶
type MountPointConfig ¶
type MountPointConfig struct {
BucketName string `key:"bucketName" json:"bucket_name"`
AccessKey string `key:"accessKey" json:"access_key"`
SecretKey string `key:"secretKey" json:"secret_key"`
Region string `key:"region" json:"region"`
EndpointURL string `key:"endpointUrl" json:"endpoint_url"`
ForcePathStyle bool `key:"forcePathStyle" json:"force_path_style"`
}
type MountPointSource ¶
type MountPointSource struct {
// contains filtered or unexported fields
}
func (*MountPointSource) Format ¶
func (s *MountPointSource) Format(fsName string) error
func (*MountPointSource) Mount ¶
func (s *MountPointSource) Mount(localPath string) error
func (*MountPointSource) Unmount ¶
func (s *MountPointSource) Unmount(localPath string) error
type PrefetchState ¶
type PrefetchState struct {
// contains filtered or unexported fields
}
PrefetchState tracks sequential read patterns per file/hash
type Prefetcher ¶
type Prefetcher struct {
// contains filtered or unexported fields
}
Prefetcher detects sequential reads and prefetches ahead
func NewPrefetcher ¶
func NewPrefetcher(ctx context.Context, cas *Store, bufferPool *BufferPool) *Prefetcher
NewPrefetcher creates a new prefetcher instance
func (*Prefetcher) OnRead ¶
func (pf *Prefetcher) OnRead(hash string, offset, length int64)
OnRead should be called on each read to detect patterns
type ReadPrefetchConfig ¶
type ReadPrefetchConfig struct {
Enabled bool `key:"enabled" json:"enabled"`
AheadBytes int64 `key:"aheadBytes" json:"ahead_bytes"`
Workers int `key:"workers" json:"workers"`
PartLengthBytes int64 `key:"partLengthBytes" json:"part_length_bytes"`
MaxPartsPerRead int `key:"maxPartsPerRead" json:"max_parts_per_read"`
}
type RedisCacheMetadataStore ¶
type RedisCacheMetadataStore struct {
// contains filtered or unexported fields
}
func (*RedisCacheMetadataStore) AddFsNodeChild ¶
func (c *RedisCacheMetadataStore) AddFsNodeChild(ctx context.Context, pid, id string) error
func (*RedisCacheMetadataStore) AddHostToIndex ¶
func (*RedisCacheMetadataStore) GetAvailableHosts ¶
func (*RedisCacheMetadataStore) GetFsNode ¶
func (c *RedisCacheMetadataStore) GetFsNode(ctx context.Context, id string) (*FSMetadata, error)
func (*RedisCacheMetadataStore) GetFsNodeChildren ¶
func (c *RedisCacheMetadataStore) GetFsNodeChildren(ctx context.Context, id string) ([]*FSMetadata, error)
func (*RedisCacheMetadataStore) RefreshStoreFromContentLock ¶
func (*RedisCacheMetadataStore) RemoveClientLock ¶
func (*RedisCacheMetadataStore) RemoveFsNode ¶
func (c *RedisCacheMetadataStore) RemoveFsNode(ctx context.Context, id string) error
func (*RedisCacheMetadataStore) RemoveFsNodeChild ¶
func (c *RedisCacheMetadataStore) RemoveFsNodeChild(ctx context.Context, pid, id string) error
func (*RedisCacheMetadataStore) RemoveHost ¶
func (*RedisCacheMetadataStore) RemoveStoreFromContentLock ¶
func (*RedisCacheMetadataStore) SetClientLock ¶
func (*RedisCacheMetadataStore) SetFsNode ¶
func (c *RedisCacheMetadataStore) SetFsNode(ctx context.Context, id string, metadata *FSMetadata) error
func (*RedisCacheMetadataStore) SetHostKeepAlive ¶
func (*RedisCacheMetadataStore) SetStoreFromContentLock ¶
type RedisClient ¶
type RedisClient struct {
redis.UniversalClient
}
func NewRedisClient ¶
func NewRedisClient(config RedisConfig, options ...func(*redis.UniversalOptions)) (*RedisClient, error)
func (*RedisClient) Keys ¶
Gets all keys using a pattern Actually runs a scan since keys locks up the database.
func (*RedisClient) PSubscribe ¶
func (*RedisClient) ToSlice ¶
func (r *RedisClient) ToSlice(v interface{}) []interface{}
type RedisConfig ¶
type RedisConfig struct {
Addrs []string `key:"addrs" json:"addrs"`
Mode RedisMode `key:"mode" json:"mode"`
ClientName string `key:"clientName" json:"client_name"`
EnableTLS bool `key:"enableTLS" json:"enable_tls"`
InsecureSkipVerify bool `key:"insecureSkipVerify" json:"insecure_skip_verify"`
MinIdleConns int `key:"minIdleConns" json:"min_idle_conns"`
MaxIdleConns int `key:"maxIdleConns" json:"max_idle_conns"`
ConnMaxIdleTime time.Duration `key:"connMaxIdleTime" json:"conn_max_idle_time"`
ConnMaxLifetime time.Duration `key:"connMaxLifetime" json:"conn_max_lifetime"`
DialTimeout time.Duration `key:"dialTimeout" json:"dial_timeout"`
ReadTimeout time.Duration `key:"readTimeout" json:"read_timeout"`
WriteTimeout time.Duration `key:"writeTimeout" json:"write_timeout"`
MaxRedirects int `key:"maxRedirects" json:"max_redirects"`
MaxRetries int `key:"maxRetries" json:"max_retries"`
PoolSize int `key:"poolSize" json:"pool_size"`
Username string `key:"username" json:"username"`
Password string `key:"password" json:"password"`
RouteByLatency bool `key:"routeByLatency" json:"route_by_latency"`
MasterName string `key:"masterName" json:"master_name"`
SentinelPassword string `key:"sentinelPassword" json:"sentinel_password"`
}
type RedisLock ¶
type RedisLock struct {
// contains filtered or unexported fields
}
func NewRedisLock ¶
func NewRedisLock(client *RedisClient, opts ...RedisLockOption) *RedisLock
type RedisLockOption ¶
type RedisLockOption func(*RedisLock)
type RedisLockOptions ¶
type RendezvousHasher ¶
type S3Client ¶
type S3Client struct {
Client *s3.Client
Source S3SourceConfig
DownloadConcurrency int64
DownloadChunkSize int64
}
func NewS3Client ¶
func NewS3Client(ctx context.Context, sourceConfig S3SourceConfig, serverConfig ServerConfig) (*S3Client, error)
func (*S3Client) BucketName ¶
func (*S3Client) DownloadIntoBuffer ¶
type S3ContentSource ¶
type S3SourceConfig ¶
type Server ¶
type Server struct {
proto.UnimplementedCacheServer
// contains filtered or unexported fields
}
func NewServerWithOptions ¶
func (*Server) GetContent ¶
func (cs *Server) GetContent(ctx context.Context, req *proto.CacheGetContentRequest) (*proto.CacheGetContentResponse, error)
func (*Server) GetContentStream ¶
func (cs *Server) GetContentStream(req *proto.CacheGetContentRequest, stream proto.Cache_GetContentStreamServer) error
func (*Server) GetState ¶
func (cs *Server) GetState(ctx context.Context, req *proto.CacheGetStateRequest) (*proto.CacheGetStateResponse, error)
func (*Server) HasContent ¶
func (cs *Server) HasContent(ctx context.Context, req *proto.CacheHasContentRequest) (*proto.CacheHasContentResponse, error)
func (*Server) StartServer ¶
func (*Server) StoreContent ¶
func (cs *Server) StoreContent(stream proto.Cache_StoreContentServer) error
func (*Server) StoreContentFromSource ¶
func (cs *Server) StoreContentFromSource(ctx context.Context, req *proto.CacheStoreContentFromSourceRequest) (*proto.CacheStoreContentFromSourceResponse, error)
func (*Server) StoreContentFromSourceWithLock ¶
func (cs *Server) StoreContentFromSourceWithLock(ctx context.Context, req *proto.CacheStoreContentFromSourceRequest) (*proto.CacheStoreContentFromSourceWithLockResponse, error)
func (*Server) StoreContentInCacheFS ¶
func (*Server) StoreSyntheticContentInCacheFS ¶
type ServerConfig ¶
type ServerConfig struct {
DiskCacheDir string `key:"diskCacheDir" json:"disk_cache_dir"`
DiskCacheMaxUsagePct float64 `key:"diskCacheMaxUsagePct" json:"disk_cache_max_usage_pct"`
ObjectTtlS int `key:"objectTtlS" json:"object_ttl_s"`
MaxCachePct int64 `key:"maxCachePct" json:"max_cache_pct"`
PageSizeBytes int64 `key:"pageSizeBytes" json:"page_size_bytes"`
PageFileBuckets int `key:"pageFileBuckets" json:"page_file_buckets"`
SmallRangeCopyThresholdBytes int64 `key:"smallRangeCopyThresholdBytes" json:"small_range_copy_threshold_bytes"`
ReadTransport ServerReadTransportConfig `key:"readTransport" json:"read_transport"`
Metadata MetadataConfig `key:"metadata" json:"metadata"`
Sources []SourceConfig `key:"sources" json:"sources"`
S3DownloadConcurrency int64 `key:"s3DownloadConcurrency" json:"s3_download_concurrency"`
S3DownloadChunkSize int64 `key:"s3DownloadChunkSize" json:"s3_download_chunk_size"`
}
type ServerOption ¶
type ServerOption func(*ServerOpts)
func WithServerAdvertiseAddr ¶
func WithServerAdvertiseAddr(addr string) ServerOption
func WithServerHostID ¶
func WithServerHostID(hostID string) ServerOption
func WithServerMetadataStore ¶
func WithServerMetadataStore(metadataStore CacheMetadataStore) ServerOption
type ServerOpts ¶
type ServerOpts struct {
HostID string
MetadataStore CacheMetadataStore
AdvertiseAddr string
}
type Source ¶
type Source interface {
Mount(localPath string) error
Format(fsName string) error
Unmount(localPath string) error
}
func NewJuiceFsSource ¶
func NewJuiceFsSource(config JuiceFSConfig) (Source, error)
func NewMountPointSource ¶
func NewMountPointSource(config MountPointConfig) (Source, error)
func NewSource ¶
func NewSource(config SourceConfig) (Source, error)
type SourceConfig ¶
type SourceConfig struct {
Mode string `key:"mode" json:"mode"`
FilesystemName string `key:"fsName" json:"filesystem_name"`
FilesystemPath string `key:"fsPath" json:"filesystem_path"`
JuiceFS JuiceFSConfig `key:"juicefs" json:"juicefs"`
MountPoint MountPointConfig `key:"mountpoint" json:"mountpoint"`
}
type StorageLayer ¶
type StorageLayer interface {
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetDiskCacheMetrics ¶
func (*Store) PageRegion ¶
type StoreContentOptions ¶
type ValkeyConfig ¶
type ValkeyConfig struct {
PrimaryName string `key:"primaryName" json:"primary_name"`
Password string `key:"password" json:"password"`
TLS bool `key:"tls" json:"tls"`
Host string `key:"host" json:"host"`
Port int `key:"port" json:"port"`
ExistingPrimary ValkeyExistingPrimary `key:"existingPrimary" json:"existingPrimary"`
}
type ValkeyExistingPrimary ¶
Source Files
¶
- buffer_pool.go
- cachefs.go
- cachefs_node.go
- client.go
- coordinator.go
- discovery.go
- errors.go
- fadvise.go
- host_directory.go
- hostmap.go
- logger.go
- metadata.go
- metadata_store.go
- metrics.go
- mock_metadata_store.go
- network.go
- path_stats.go
- prefetcher.go
- raw_transport.go
- redis.go
- s3_client.go
- sendfile_linux.go
- server.go
- source.go
- source_juicefs.go
- source_mountpoint.go
- storage.go
- store_lock.go
- types.go