storage

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultParallelism is the default number of IP addresses assigned to storage.
	// This maintains legacy default behaviour for storage classes that do not specify a value.
	DefaultParallelism = 4
)

Variables

View Source
var ErrAllocation = fmt.Errorf("allocation error")

Functions

This section is empty.

Types

type Client

type Client struct {
	common.ClientArgs
}

Client provides a restful API for storage.

func New

func New(clientArgs common.ClientArgs) *Client

New creates a new client.

func (*Client) CreateV2

func (c *Client) CreateV2(ctx context.Context, request *openapi.StorageV2Create) (*openapi.StorageV2Read, error)

CreateV2 satisifies an http PUT action by creating a unique storage object. It does this leveraging the saga system which acts as a tape to enable rollbacks in case of errors.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, storageID string) error

Delete satisfies the http DELETE action by removing the client. It does not leverage the saga system because we can rely on finalizers to handle this for us.

func (*Client) Get

func (c *Client) Get(ctx context.Context, storageID string) (*openapi.StorageV2Read, error)

Get returns a storage object for a specific storageID.

func (*Client) GetRaw

func (c *Client) GetRaw(ctx context.Context, storageID string) (*regionv1.FileStorage, error)

func (*Client) GetStorageClass

func (c *Client) GetStorageClass(ctx context.Context, storageClassID string) (*openapi.StorageClassV2Read, error)

func (*Client) ListV2

ListV2 satisfies an http get to return all storage items within a project.

func (*Client) Update

func (c *Client) Update(ctx context.Context, storageID string, request *openapi.StorageV2Update) (*openapi.StorageV2Read, error)

Update satisifies an http POST action by updating the storage object attached to the storage ID. it leverages the update saga system, which acts as a tape to enable rollbacks in case of errors.

type Driver added in v1.13.0

type Driver interface {
	GetDetails(ctx context.Context, projectID string, fileStorageID string) (*types.FileStorageDetails, error)
}

type NetworkGetter added in v1.14.0

type NetworkGetter interface {
	GetV2(ctx context.Context, id string) (*openapi.NetworkV2Read, error)
}

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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