objectstorage

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudProviderGCP       = "gcp"
	CloudProviderGCPNative = "gcpnative"
	CloudProviderAWS       = "aws"
	CloudProviderAliyun    = "aliyun"
	CloudProviderAzure     = "azure"
	CloudProviderTencent   = "tencent"
)

Variables

View Source
var CheckBucketRetryAttempts uint = 20

Functions

func NewAzureObjectStorageClient

func NewAzureObjectStorageClient(ctx context.Context, c *Config) (*service.Client, error)

func NewGcpObjectStorageClient

func NewGcpObjectStorageClient(ctx context.Context, c *Config) (*storage.Client, error)

func NewMinioClient

func NewMinioClient(ctx context.Context, c *Config) (*minio.Client, error)

Types

type Config

type Config struct {
	Address              string
	BucketName           string
	AccessKeyID          string
	SecretAccessKeyID    string
	UseSSL               bool
	SslCACert            string
	CreateBucket         bool
	RootPath             string
	UseIAM               bool
	CloudProvider        string
	IAMEndpoint          string
	UseVirtualHost       bool
	Region               string
	RequestTimeoutMs     int64
	GcpCredentialJSON    string
	GcpNativeWithoutAuth bool // used for Unit Testing
}

Config for setting params used by chunk manager client.

func NewDefaultConfig

func NewDefaultConfig() *Config

type Option

type Option func(*Config)

Option is used to Config the retry function.

func AccessKeyID

func AccessKeyID(accessKeyID string) Option

func Address

func Address(addr string) Option

func BucketName

func BucketName(bucketName string) Option

func CloudProvider

func CloudProvider(cloudProvider string) Option

func CreateBucket

func CreateBucket(createBucket bool) Option

func GcpCredentialJSON

func GcpCredentialJSON(gcpCredentialJSON string) Option

func IAMEndpoint

func IAMEndpoint(iamEndpoint string) Option

func Region

func Region(region string) Option

func RequestTimeout

func RequestTimeout(requestTimeoutMs int64) Option

func RootPath

func RootPath(rootPath string) Option

func SecretAccessKeyID

func SecretAccessKeyID(secretAccessKeyID string) Option

func SslCACert

func SslCACert(sslCACert string) Option

func UseIAM

func UseIAM(useIAM bool) Option

func UseSSL

func UseSSL(useSSL bool) Option

func UseVirtualHost

func UseVirtualHost(useVirtualHost bool) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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