miniocontroller

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a Minio controller.

func New

func New(p Params) (*Controller, error)

New creates a new controller.

func (*Controller) Clear

func (c *Controller) Clear(keepBuckets bool) error

Clear removes all data from the Minio instance, but is limited to the first 1000 objects in each of the buckets.

func (*Controller) CreateMinioClient

func (c *Controller) CreateMinioClient() (*minio.Client, error)

CreateMinioClient creates a Minio S3 client pointed at the minio instance.

func (*Controller) CreateS3Client

func (c *Controller) CreateS3Client() *s3.S3

CreateS3Client creates a Amazon S3 client pointed at the minio instance.

func (*Controller) Destroy

func (c *Controller) Destroy(deleteTempDir bool) error

Destroy destroys the controller. If deleteTempDir is true, all files created by the controller will be removed.

func (*Controller) GetPort

func (c *Controller) GetPort() int

GetPort returns the port on which Minio is listening.

type Params

type Params struct {
	// ExecutablePath is the path of the minio executable.
	ExecutablePath string
	// AccessKey is the access key to set for the Minio server.
	AccessKey string
	// SecretKey is the secret key to set for the Minio server.
	SecretKey string
	// RootTempDir is where temporary files should be placed.
	RootTempDir string
	// Region is the region string, e.g. 'us-west-1'.
	Region string
}

Params are Parameters for creating a Minio controller. All the entries are required.

Jump to

Keyboard shortcuts

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