minio

package
v0.15.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceName      = "minio-service"
	ServiceAPIPort   = 9000 // API port
	ServiceWebUIPort = 9001 // WebUI port
	DeploymentName   = "minio"
	Image            = "minio/minio:RELEASE.2024-03-30T09-41-56Z"
	StorageClassName = "standard" // standard | gp2 | default
	VolumeClaimName  = "minio-data"
	VolumeMountPath  = "/data"
)

Variables

View Source
var (
	ErrMinioFailedToStart                       = errors.New("MinioFailedToStart", "failed to create or update Minio deployment")
	ErrMinioFailedToBeReady                     = errors.New("MinioFailedToBeReady", "failed waiting for Minio to be ready")
	ErrMinioFailedToCreateOrUpdateService       = errors.New("MinioFailedToCreateOrUpdateService", "failed to create or update Minio service")
	ErrMinioFailedToBeReadyService              = errors.New("MinioFailedToBeReadyService", "failed waiting for Minio service to be ready")
	ErrMinioFailedToCreatePVC                   = errors.New("MinioFailedToCreatePVC", "failed to create PVC")
	ErrMinioFailedToCreateDeployment            = errors.New("MinioFailedToCreateDeployment", "failed to create Minio deployment")
	ErrMinioFailedToGetDeployment               = errors.New("MinioFailedToGetDeployment", "failed to get Minio deployment")
	ErrMinioFailedToUpdateDeployment            = errors.New("MinioFailedToUpdateDeployment", "failed to update Minio deployment")
	ErrMinioFailedToGetService                  = errors.New("MinioFailedToGetService", "failed to get Minio deployment")
	ErrMinioFailedToGetEndpoint                 = errors.New("MinioFailedToGetEndpoint", "failed to get Minio endpoint")
	ErrMinioFailedToInitializeClient            = errors.New("MinioFailedToInitializeClient", "failed to initialize Minio client")
	ErrMinioFailedToCreateBucket                = errors.New("MinioFailedToCreateBucket", "failed to create bucket")
	ErrMinioFailedToUploadData                  = errors.New("MinioFailedToUploadData", "failed to upload data to Minio")
	ErrMinioFailedToGetPresignedURL             = errors.New("MinioFailedToGetPresignedURL", "failed to generate presigned URL for Minio object")
	ErrMinioFailedToUpdateService               = errors.New("MinioFailedToUpdateService", "failed to update Minio service")
	ErrMinioFailedToFindFileBeforeDeletion      = errors.New("MinioFailedToFindFileBeforeDeletion", "failed to find file in Minio before deletion")
	ErrMinioFailedToDeleteFile                  = errors.New("MinioFailedToDeleteFile", "failed to delete file from Minio")
	ErrMinioFailedToGetMinioEndpoint            = errors.New("MinioFailedToGetMinioEndpoint", "failed to get Minio endpoint")
	ErrMinioFailedToGeneratePresignedURL        = errors.New("MinioFailedToGeneratePresignedURL", "failed to generate presigned URL for Minio object")
	ErrMinioFailedToCreateService               = errors.New("MinioFailedToCreateService", "failed to create Minio service")
	ErrMinioFailedToCheckBucket                 = errors.New("MinioFailedToCheckBucket", "failed to check if bucket exists")
	ErrMinioLoadBalancerIPNotAvailable          = errors.New("MinioLoadBalancerIPNotAvailable", "LoadBalancer IP not available yet")
	ErrMinioFailedToGetNodes                    = errors.New("MinioFailedToGetNodes", "failed to get nodes")
	ErrMinioNoNodesFound                        = errors.New("MinioNoNodesFound", "no nodes found")
	ErrMinioTimeoutWaitingForReady              = errors.New("MinioTimeoutWaitingForReady", "timeout waiting for Minio to be ready")
	ErrMinioNodePortNotSet                      = errors.New("MinioNodePortNotSet", "NodePort for minio service is not set")
	ErrMinioExternalIPsNotSet                   = errors.New("MinioExternalIPsNotSet", "external IPs for minio service are not set")
	ErrMinioTimeoutWaitingForServiceReady       = errors.New("MinioTimeoutWaitingForServiceReady", "timeout waiting for Minio service to be ready")
	ErrMinioFailedToConnect                     = errors.New("MinioFailedToConnect", "failed to connect to %s")
	ErrMinioFailedToParseStorageSize            = errors.New("MinioFailedToParseStorageSize", "failed to parse storage size")
	ErrMinioFailedToListPersistentVolumes       = errors.New("MinioFailedToListPersistentVolumes", "failed to list PersistentVolumes")
	ErrMinioFailedToCreatePersistentVolume      = errors.New("MinioFailedToCreatePersistentVolume", "failed to create PersistentVolume")
	ErrMinioFailedToCreatePersistentVolumeClaim = errors.New("MinioFailedToCreatePersistentVolumeClaim", "failed to create PersistentVolumeClaim")
	ErrMinioClientNotInitialized                = errors.New("MinioClientNotInitialized", "Minio client not initialized")
	ErrMinioNotInitialized                      = errors.New("MinioNotInitialized", "Minio not initialized")
)
View Source
var (
	PVCStorageSize = resource.MustParse("1Gi")
)

Functions

This section is empty.

Types

type Config added in v0.15.1

type Config struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
}

type Error added in v0.13.3

type Error = errors.Error

type Minio

type Minio struct {
	Logger *logrus.Logger
	// contains filtered or unexported fields
}

func New added in v0.15.1

func New(ctx context.Context, k8sClient k8s.KubeManager, logger *logrus.Logger) (*Minio, error)

func (*Minio) Delete added in v0.15.1

func (m *Minio) Delete(ctx context.Context, minioFilePath, bucketName string) error

Delete deletes a file from Minio and fails if the content does not exist

func (*Minio) GetConfigs added in v0.15.1

func (m *Minio) GetConfigs(ctx context.Context) (*Config, error)

func (*Minio) GetURL added in v0.15.1

func (m *Minio) GetURL(ctx context.Context, minioFilePath, bucketName string) (string, error)

GetURL returns an S3-compatible URL for a Minio file

func (*Minio) Push added in v0.15.1

func (m *Minio) Push(ctx context.Context, localReader io.Reader, minioFilePath, bucketName string) error

Push pushes data (i.e. a reader) to Minio

Jump to

Keyboard shortcuts

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