cdn_bstore_controller

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigID = ControllerID

ConfigID is the string used to identify this config object.

View Source
const ControllerID = "spacewave/cdn/bstore"

ControllerID identifies the anonymous CDN block store controller.

Variables

View Source
var Version = semver.MustParse("0.0.1")

Version is the version of the block store implementation.

Functions

func NewBlockStoreBuilder

func NewBlockStoreBuilder(le *logrus.Entry, b bus.Bus, conf *Config) block_store_controller.BlockStoreBuilder

NewBlockStoreBuilder constructs a new block store builder from config.

Types

type Config

type Config struct {

	// BlockStoreId is the block store id to use on the bus.
	BlockStoreId string `protobuf:"bytes,1,opt,name=block_store_id,json=blockStoreId,proto3" json:"blockStoreId,omitempty"`
	// SpaceId is the public CDN Space id.
	SpaceId string `protobuf:"bytes,2,opt,name=space_id,json=spaceId,proto3" json:"spaceId,omitempty"`
	// CdnBaseUrl is the public CDN base URL.
	CdnBaseUrl string `protobuf:"bytes,3,opt,name=cdn_base_url,json=cdnBaseUrl,proto3" json:"cdnBaseUrl,omitempty"`
	// PointerTtlDur is the cached root pointer TTL.
	// Empty uses the CDN block store default. Negative disables expiry.
	PointerTtlDur string `protobuf:"bytes,4,opt,name=pointer_ttl_dur,json=pointerTtlDur,proto3" json:"pointerTtlDur,omitempty"`
	// CacheBlockStoreId optionally resolves a local block store for co-block
	// writeback while reading remote pack ranges.
	CacheBlockStoreId string `protobuf:"bytes,5,opt,name=cache_block_store_id,json=cacheBlockStoreId,proto3" json:"cacheBlockStoreId,omitempty"`
	// WritebackWindowBytes sets the semantic co-block writeback window.
	WritebackWindowBytes int64 `protobuf:"varint,6,opt,name=writeback_window_bytes,json=writebackWindowBytes,proto3" json:"writebackWindowBytes,omitempty"`
	// RangeCacheMaxBytes sets the resident range-cache budget per pack reader.
	RangeCacheMaxBytes int64 `protobuf:"varint,7,opt,name=range_cache_max_bytes,json=rangeCacheMaxBytes,proto3" json:"rangeCacheMaxBytes,omitempty"`
	// BucketIds is a list of bucket ids to serve LookupBlockFromNetwork directives.
	BucketIds []string `protobuf:"bytes,8,rep,name=bucket_ids,json=bucketIds,proto3" json:"bucketIds,omitempty"`
	// SkipNotFound skips returning a value if the block was not found.
	SkipNotFound bool `protobuf:"varint,9,opt,name=skip_not_found,json=skipNotFound,proto3" json:"skipNotFound,omitempty"`
	// Verbose enables verbose logging of the block store.
	Verbose bool `protobuf:"varint,10,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// contains filtered or unexported fields
}

Config configures an anonymous CDN block store controller.

func NewConfig

func NewConfig(blockStoreID, spaceID, cdnBaseURL string) *Config

NewConfig constructs a new config.

func (*Config) CloneMessageVT

func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Config) CloneVT

func (m *Config) CloneVT() *Config

func (*Config) EqualMessageVT

func (this *Config) EqualMessageVT(thatMsg any) bool

func (*Config) EqualVT

func (this *Config) EqualVT(that *Config) bool

func (*Config) EqualsConfig

func (c *Config) EqualsConfig(other config.Config) bool

EqualsConfig checks if the config is equal to another.

func (*Config) GetBlockStoreId

func (x *Config) GetBlockStoreId() string

func (*Config) GetBucketIds

func (x *Config) GetBucketIds() []string

func (*Config) GetCacheBlockStoreId

func (x *Config) GetCacheBlockStoreId() string

func (*Config) GetCdnBaseUrl

func (x *Config) GetCdnBaseUrl() string

func (*Config) GetConfigID

func (c *Config) GetConfigID() string

GetConfigID returns the unique string for this configuration type.

func (*Config) GetPointerTtlDur

func (x *Config) GetPointerTtlDur() string

func (*Config) GetRangeCacheMaxBytes

func (x *Config) GetRangeCacheMaxBytes() int64

func (*Config) GetSkipNotFound

func (x *Config) GetSkipNotFound() bool

func (*Config) GetSpaceId

func (x *Config) GetSpaceId() string

func (*Config) GetVerbose

func (x *Config) GetVerbose() bool

func (*Config) GetWritebackWindowBytes

func (x *Config) GetWritebackWindowBytes() int64

func (*Config) MarshalJSON

func (x *Config) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Config to JSON.

func (*Config) MarshalProtoJSON

func (x *Config) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Config message to JSON.

func (*Config) MarshalProtoText

func (x *Config) MarshalProtoText() string

func (*Config) MarshalToSizedBufferVT

func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Config) MarshalToVT

func (m *Config) MarshalToVT(dAtA []byte) (int, error)

func (*Config) MarshalVT

func (m *Config) MarshalVT() (dAtA []byte, err error)

func (*Config) ParsePointerTTLDur

func (c *Config) ParsePointerTTLDur() (time.Duration, error)

ParsePointerTTLDur parses the root pointer TTL field.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT

func (m *Config) SizeVT() (n int)

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalJSON

func (x *Config) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Config from JSON.

func (*Config) UnmarshalProtoJSON

func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Config message from JSON.

func (*Config) UnmarshalVT

func (m *Config) UnmarshalVT(dAtA []byte) error

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type Controller

Controller implements the anonymous CDN block store controller.

func NewController

func NewController(le *logrus.Entry, b bus.Bus, conf *Config) *Controller

NewController builds a new anonymous CDN block store controller.

type Factory

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

Factory constructs the CDN block store.

func NewFactory

func NewFactory(bus bus.Bus) *Factory

NewFactory builds the factory.

func (*Factory) Construct

Construct constructs the associated controller given configuration.

func (*Factory) ConstructConfig

func (t *Factory) ConstructConfig() config.Config

ConstructConfig constructs an instance of the controller configuration.

func (*Factory) GetConfigID

func (t *Factory) GetConfigID() string

GetConfigID returns the configuration ID for the controller.

func (*Factory) GetControllerID

func (t *Factory) GetControllerID() string

GetControllerID returns the unique ID for the controller.

func (*Factory) GetVersion

func (t *Factory) GetVersion() semver.Version

GetVersion returns the version of this controller.

Jump to

Keyboard shortcuts

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