bucket_http_server

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 18 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 = "hydra/bucket/http/server"

ControllerID is the controller identifier.

Variables

View Source
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) 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) GetBucketId

func (x *Config) GetBucketId() string

func (*Config) GetConfigID

func (c *Config) GetConfigID() string

GetConfigID returns the unique string for this configuration type.

func (*Config) GetForceHashType

func (x *Config) GetForceHashType() hash.HashType

func (*Config) GetPathPrefix

func (x *Config) GetPathPrefix() string

func (*Config) GetVolumeId

func (x *Config) GetVolumeId() string

func (*Config) GetWrite

func (x *Config) GetWrite() bool

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) 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 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 NewFactory

func NewFactory(bus bus.Bus) *Factory

NewFactory builds the factory.

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

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() controller.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