Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (x *Config) GetBucketId() string
- func (c *Config) GetConfigID() string
- func (x *Config) GetEngineId() string
- func (x *Config) GetInitHeadRef() *bucket.ObjectRef
- func (x *Config) GetKvKeyOpts() *kvkey.Config
- func (x *Config) GetNoGenerateKey() bool
- func (x *Config) GetNoWriteKey() bool
- func (x *Config) GetObjectKey() string
- func (x *Config) GetStoreConfig() *kvtx.Config
- func (x *Config) GetVerbose() bool
- func (x *Config) GetVolumeConfig() *controller.Config
- func (x *Config) GetVolumeId() string
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Factory
- func (t *Factory) Construct(ctx context.Context, conf config.Config, opts controller.ConstructOpts) (controller.Controller, error)
- func (t *Factory) ConstructConfig() config.Config
- func (t *Factory) GetConfigID() string
- func (t *Factory) GetControllerID() string
- func (t *Factory) GetVersion() controller.Version
- type Volume
Constants ¶
const ControllerID = "hydra/volume/world"
ControllerID identifies the world object volume controller.
Variables ¶
var ConfigID = ControllerID
ConfigID is the id attached to the config objects.
var Version = controller.MustParseVersion("0.0.1")
Version is the version of the KVTxInmem implementation.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// KvKeyOpts are key/value key constants.
KvKeyOpts *kvkey.Config `protobuf:"bytes,1,opt,name=kv_key_opts,json=kvKeyOpts,proto3" json:"kvKeyOpts,omitempty"`
// Verbose will log all operations to the logger for debugging.
Verbose bool `protobuf:"varint,2,opt,name=verbose,proto3" json:"verbose,omitempty"`
// VolumeConfig is the volume controller config.
VolumeConfig *controller.Config `protobuf:"bytes,3,opt,name=volume_config,json=volumeConfig,proto3" json:"volumeConfig,omitempty"`
// StoreConfig is the store configuration for kvtx.
StoreConfig *kvtx.Config `protobuf:"bytes,4,opt,name=store_config,json=storeConfig,proto3" json:"storeConfig,omitempty"`
// NoGenerateKey indicates the controller should not generate a private key if
// one is not already present. Setting this to false will cause the system to
// create a new private key if one is not present in the store at startup. If
// no key is in the store at startup and this is true, returns an error.
NoGenerateKey bool `protobuf:"varint,5,opt,name=no_generate_key,json=noGenerateKey,proto3" json:"noGenerateKey,omitempty"`
// NoWriteKey indicates the controller should not write a private key to
// storage if it generates one. This results in an ephemeral volume peer
// identity if there is no key present in the store already.
//
// Has no effect if the store has a peer private key.
NoWriteKey bool `protobuf:"varint,11,opt,name=no_write_key,json=noWriteKey,proto3" json:"noWriteKey,omitempty"`
// InitHeadRef is the reference to the initial HEAD state of the volume.
// If the object does not exist, uses this reference to initialize it.
InitHeadRef *bucket.ObjectRef `protobuf:"bytes,6,opt,name=init_head_ref,json=initHeadRef,proto3" json:"initHeadRef,omitempty"`
// EngineId is the world engine to attach to for reading/writing state.
EngineId string `protobuf:"bytes,7,opt,name=engine_id,json=engineId,proto3" json:"engineId,omitempty"`
// ObjectKey is the BlockVolume object to attach to.
// If not exists, waits for it to exist.
ObjectKey string `protobuf:"bytes,8,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
// BucketId is the bucket id to attach to for reading/writing state.
// If set, overrides the bucket id from init_head_ref and the state.
// If unset, the bucket id is determined from head_ref.
BucketId string `protobuf:"bytes,9,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
// VolumeId is the volume id to attach to for reading/writing data.
// If unset, init_head_ref must be set, and the volume will be read-only.
VolumeId string `protobuf:"bytes,10,opt,name=volume_id,json=volumeId,proto3" json:"volumeId,omitempty"`
// contains filtered or unexported fields
}
Config is the World Object block-graph backed hydra volume config.
func NewConfig ¶
func NewConfig( volumeID, bucketID, engineID, objectKey string, initHeadRef *bucket.ObjectRef, ) *Config
NewConfig constructs a new block volume config.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the config is equal to another.
func (*Config) GetBucketId ¶
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type. This string is stored with the encoded config.
func (*Config) GetEngineId ¶
func (*Config) GetInitHeadRef ¶
func (*Config) GetKvKeyOpts ¶
func (*Config) GetNoGenerateKey ¶
func (*Config) GetNoWriteKey ¶
func (*Config) GetObjectKey ¶
func (*Config) GetStoreConfig ¶
func (*Config) GetVerbose ¶
func (*Config) GetVolumeConfig ¶
func (x *Config) GetVolumeConfig() *controller.Config
func (*Config) GetVolumeId ¶
func (*Config) MarshalJSON ¶
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 (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalJSON ¶
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 ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs a block graph backed volume.
func (*Factory) Construct ¶
func (t *Factory) Construct( ctx context.Context, conf config.Config, opts controller.ConstructOpts, ) (controller.Controller, error)
Construct constructs the associated controller given configuration.
func (*Factory) ConstructConfig ¶
ConstructConfig constructs an instance of the controller configuration.
func (*Factory) GetConfigID ¶
GetConfigID returns the unique ID for the config.
func (*Factory) GetControllerID ¶
GetControllerID returns the unique ID for the controller.
func (*Factory) GetVersion ¶
func (t *Factory) GetVersion() controller.Version
GetVersion returns the version of this controller.
type Volume ¶
type Volume struct {
*common_kvtx.Volume
// contains filtered or unexported fields
}
Volume implements a World Object block-graph kvtx backed volume.
func NewVolume ¶
func NewVolume( ctx context.Context, le *logrus.Entry, b bus.Bus, sfs *block_transform.StepFactorySet, conf *Config, ) (v *Volume, err error)
NewVolume builds the block-graph volume storing state in a object store.