openstack

package
v0.0.0-...-cae4bf4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwiftConfig

type SwiftConfig struct {
	thanos.SwiftConfig `yaml:",inline"`
}

SwiftConfig is config for the Swift Chunk Client.

func (*SwiftConfig) RegisterFlags

func (cfg *SwiftConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

func (*SwiftConfig) RegisterFlagsWithPrefix

func (cfg *SwiftConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers flags with prefix.

func (*SwiftConfig) Validate

func (cfg *SwiftConfig) Validate() error

Validate config and returns error on failure

type SwiftObjectClient

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

func NewSwiftObjectClient

func NewSwiftObjectClient(cfg SwiftConfig, delimiter string) (*SwiftObjectClient, error)

NewSwiftObjectClient makes a new chunk.Client that writes chunks to OpenStack Swift.

func (*SwiftObjectClient) DeleteObject

func (s *SwiftObjectClient) DeleteObject(ctx context.Context, objectKey string) error

DeleteObject deletes the specified object key from the configured Swift container. If the key does not exist a generic chunk.ErrStorageObjectNotFound error is returned.

func (*SwiftObjectClient) GetObject

func (s *SwiftObjectClient) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)

GetObject returns a reader for the specified object key from the configured swift container. If the key does not exist a generic chunk.ErrStorageObjectNotFound error is returned.

func (*SwiftObjectClient) List

List only objects from the store non-recursively

func (*SwiftObjectClient) PathSeparator

func (s *SwiftObjectClient) PathSeparator() string

func (*SwiftObjectClient) PutObject

func (s *SwiftObjectClient) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error

PutObject puts the specified bytes into the configured Swift container at the provided key

func (*SwiftObjectClient) Stop

func (s *SwiftObjectClient) Stop()

Jump to

Keyboard shortcuts

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