miniod

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopAll

func StopAll()

StopAll stops all MinIO processes cleanly.

Types

type AddServiceAccountResp

type AddServiceAccountResp struct {
	AccessKey    string `json:"accessKey,omitempty"`
	SecretKey    string `json:"secretKey,omitempty"`
	SessionToken string `json:"sessionToken,omitempty"`
}

AddServiceAccountResp is the response body of the add service account call.

type AdminClient

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

AdminClient represents minio client.

func (*AdminClient) AddAlias

func (c *AdminClient) AddAlias(ctx context.Context) error

AddAlias adds a new alias to configuration file.

func (*AdminClient) AddServiceAccount

func (c *AdminClient) AddServiceAccount(ctx context.Context, account, accessKey, secretKey string, policy []byte) (*AddServiceAccountResp, error)

AddServiceAccount adds a new service account.

func (*AdminClient) DeleteServiceAccount

func (c *AdminClient) DeleteServiceAccount(ctx context.Context, accessKey string) error

DeleteServiceAccount removes a service account.

func (*AdminClient) ExportIAM

func (c *AdminClient) ExportIAM(ctx context.Context) ([]byte, error)

ExportIAM exports IAM data.

func (*AdminClient) InfoServiceAccount

func (c *AdminClient) InfoServiceAccount(ctx context.Context, accessKey string) (*InfoServiceAccountResp, error)

InfoServiceAccount returns a service account info.

func (*AdminClient) RemoveAlias

func (c *AdminClient) RemoveAlias(ctx context.Context) error

RemoveAlias removes an alias from configuration file.

func (*AdminClient) ServiceStop

func (c *AdminClient) ServiceStop(ctx context.Context) error

ServiceStop stops the MinIO cluster.

func (*AdminClient) UpdateServiceAccount

func (c *AdminClient) UpdateServiceAccount(ctx context.Context, account, secretKey string, policy []byte) error

UpdateServiceAccount modifies an existing service account.

type InfoServiceAccountResp

type InfoServiceAccountResp struct {
	AccountStatus string         `json:"accountStatus"`
	ParentUser    string         `json:"parentUser"`
	Policy        map[string]any `json:"policy"`
}

InfoServiceAccountResp is the response body of the info service account call.

type Process

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

Process represents a running minio process.

func EnsureRunning

func EnsureRunning(s *state.State, bucketVol storageDrivers.Volume) (*Process, error)

EnsureRunning starts a MinIO process for the bucket (if not already running) and returns running Process.

func Get

func Get(bucketName string) (*Process, error)

Get returns an existing MinIO process if it exists.

func (*Process) AdminClient

func (p *Process) AdminClient() (*AdminClient, error)

AdminClient returns admin client for the minio process.

func (*Process) AdminUser

func (p *Process) AdminUser() string

AdminUser returns admin user name.

func (*Process) S3Client

func (p *Process) S3Client() (*minio.Client, error)

S3Client returns S3 client for the minio process.

func (*Process) Stop

func (p *Process) Stop(ctx context.Context) error

Stop will try and cleanly stop the service and if context is cancelled then it forcefully kills the process. If ctx doesn't have a deadline then a default timeout of 5s is added.

func (*Process) URL

func (p *Process) URL() url.URL

URL of MinIO process.

func (*Process) WaitReady

func (p *Process) WaitReady(ctx context.Context) error

WaitReady waits until process is ready.

Jump to

Keyboard shortcuts

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