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) GetForceHashType() hash.HashType
- func (x *Config) GetPathPrefix() string
- func (x *Config) GetVolumeId() string
- func (x *Config) GetWrite() bool
- 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 Controller
- 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
Constants ¶
const ConfigID = ControllerID
ConfigID is the string used to identify this config object.
const ControllerID = "hydra/bucket/http/server"
ControllerID is the controller identifier.
Variables ¶
var Version = controller.MustParseVersion("0.0.1")
Version is the controller version.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// BucketId is the bucket id to lookup on the bus.
BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
// VolumeId is the volume id to read/write from.
// If unset, uses the BucketLookup API to lookup blocks.
// Can be empty.
VolumeId string `protobuf:"bytes,2,opt,name=volume_id,json=volumeId,proto3" json:"volumeId,omitempty"`
// Write enables the write api endpoints (put, delete).
Write bool `protobuf:"varint,3,opt,name=write,proto3" json:"write,omitempty"`
// PathPrefix is the path prefix to use for requests.
// [path_prefix]/{get,put,exists,rm}
// Can be empty.
PathPrefix string `protobuf:"bytes,4,opt,name=path_prefix,json=pathPrefix,proto3" json:"pathPrefix,omitempty"`
// ForceHashType forces writing the given hash type to the store.
// If unset, accepts any hash type the underlying bucket accepts.
ForceHashType hash.HashType `protobuf:"varint,5,opt,name=force_hash_type,json=forceHashType,proto3" json:"forceHashType,omitempty"`
// contains filtered or unexported fields
}
Config configures the bucket store http server.
Handles LookupHTTPHandler with the block store endpoints.
func NewConfig ¶
func NewConfig(bucketID, volumeID string, write bool, pathPrefix string, forceHashType hash.HashType) *Config
NewConfig constructs a new 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.
func (*Config) GetForceHashType ¶
func (*Config) GetPathPrefix ¶
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 Controller ¶
type Controller = bifrost_http.HTTPHandlerController
Controller is the bucket http server controller.
Handles LookupHTTPHandler with the block store endpoints.
func NewController ¶
func NewController(b bus.Bus, conf *Config) *Controller
NewController constructs a new http handler controller.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory constructs the http server
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 configuration ID for the controller.
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.