Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.57.21 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostStorageID

func GetHostStorageID(ctx context.Context) string

GetHostStorageID returns the explicit child-plugin storage selection, if any.

func WithHostStorageID

func WithHostStorageID(ctx context.Context, id string) context.Context

WithHostStorageID carries the runtime's explicit plugin storage selection. The ID is resolved on the runtime bus that will host child plugins.

Types

type LookupStorage

type LookupStorage interface {
	// Directive indicates LookupStorage is a directive.
	directive.Directive

	// LookupStorageId is the storage id to lookup.
	// If empty, returns all storage on the bus.
	LookupStorageId() string
}

LookupStorage is a directive to lookup a volume factory (Storage).

func NewLookupStorage

func NewLookupStorage(storageId string) LookupStorage

NewLookupStorage constructs a new LookupStorage directive.

type LookupStorageValue

type LookupStorageValue = Storage

LookupStorageValue is the result type for LookupStorage. Multiple results may be pushed to the directive.

func ExLookupStorage

func ExLookupStorage(
	ctx context.Context,
	b bus.Bus,
	storageId string,
	waitOne bool,
) ([]LookupStorageValue, directive.Instance, directive.Reference, error)

ExLookupStorage executes the LookupStorage directive. If waitOne is set, waits for at least one value before returning.

type Storage

type Storage interface {
	// GetStorageInfo returns StorageInfo.
	GetStorageInfo() *StorageInfo
	// AddFactories adds the factories to the resolver.
	AddFactories(b bus.Bus, sr *static.Resolver)
	// BuildVolumeConfig creates the volume config for the store ID.
	// Returns nil if the storage cannot produce Volume.
	// baseVolCtrlConf can be nil
	// NOTE: id should be checked / sanitized before calling this.
	BuildVolumeConfig(id string, baseVolCtrlConf *volume_controller.Config) (config.Config, error)
	// DeleteVolume removes the backing store for the given volume ID.
	// The volume must be closed before calling this.
	DeleteVolume(id string) error
}

Storage is an available storage mechanism in the environment.

type StorageInfo

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

StorageInfo is information about an available storage method.

func (*StorageInfo) CloneMessageVT

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

func (*StorageInfo) CloneVT

func (m *StorageInfo) CloneVT() *StorageInfo

func (*StorageInfo) EqualMessageVT

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

func (*StorageInfo) EqualVT

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

func (*StorageInfo) MarshalJSON

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

MarshalJSON marshals the StorageInfo to JSON.

func (*StorageInfo) MarshalProtoJSON

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

MarshalProtoJSON marshals the StorageInfo message to JSON.

func (*StorageInfo) MarshalProtoText

func (x *StorageInfo) MarshalProtoText() string

func (*StorageInfo) MarshalToSizedBufferVT

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

func (*StorageInfo) MarshalToVT

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

func (*StorageInfo) MarshalVT

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

func (*StorageInfo) ProtoMessage

func (*StorageInfo) ProtoMessage()

func (*StorageInfo) Reset

func (x *StorageInfo) Reset()

func (*StorageInfo) SizeVT

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

func (*StorageInfo) String

func (x *StorageInfo) String() string

func (*StorageInfo) UnmarshalJSON

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

UnmarshalJSON unmarshals the StorageInfo from JSON.

func (*StorageInfo) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the StorageInfo message from JSON.

func (*StorageInfo) UnmarshalVT

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

Directories

Path Synopsis
Package storage_node binds Node SQLite connections to the existing volume factory.
Package storage_node binds Node SQLite connections to the existing volume factory.

Jump to

Keyboard shortcuts

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