minio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmbeddedMinIO

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

EmbeddedMinIO represents an embedded MinIO server instance

func NewEmbeddedMinIO

func NewEmbeddedMinIO(config *EmbeddedMinIOConfig) (*EmbeddedMinIO, error)

NewEmbeddedMinIO creates a new embedded MinIO server instance with modern configuration

func (*EmbeddedMinIO) GetClient

func (m *EmbeddedMinIO) GetClient() *minio.Client

GetClient returns the MinIO client instance (thread-safe)

func (*EmbeddedMinIO) GetEndpoint

func (m *EmbeddedMinIO) GetEndpoint() string

GetEndpoint returns the MinIO server endpoint

func (*EmbeddedMinIO) IsRunning

func (m *EmbeddedMinIO) IsRunning() bool

IsRunning returns whether the MinIO server is currently running (thread-safe)

func (*EmbeddedMinIO) Start

func (m *EmbeddedMinIO) Start(ctx context.Context) error

Start starts the embedded MinIO server with context support and modern practices

func (*EmbeddedMinIO) Stop

func (m *EmbeddedMinIO) Stop(ctx context.Context) error

Stop stops the embedded MinIO server gracefully

type EmbeddedMinIOConfig

type EmbeddedMinIOConfig struct {
	// Server configuration
	Port    int    `yaml:"port" json:"port"`         // Server port (default: 9000)
	Address string `yaml:"address" json:"address"`   // Bind address (default: localhost)
	DataDir string `yaml:"data_dir" json:"data_dir"` // Data directory for MinIO storage

	// Authentication
	AccessKey string `yaml:"access_key" json:"access_key"` // MinIO access key (default: minioadmin)
	SecretKey string `yaml:"secret_key" json:"secret_key"` // MinIO secret key (default: minioadmin)

	// Behavior
	AutoStart bool `yaml:"auto_start" json:"auto_start"` // Auto-start server with Icebox (default: true)
	Console   bool `yaml:"console" json:"console"`       // Enable MinIO console (default: false)
	Quiet     bool `yaml:"quiet" json:"quiet"`           // Suppress MinIO logs (default: true)

	// Security & Performance
	Secure bool `yaml:"secure" json:"secure"` // Use HTTPS (default: false for embedded)

	// Advanced configuration
	Region        string            `yaml:"region" json:"region"`                 // Default region (default: us-east-1)
	DefaultBucket string            `yaml:"default_bucket" json:"default_bucket"` // Default bucket name (default: icebox)
	Properties    map[string]string `yaml:"properties" json:"properties"`         // Additional MinIO properties

	// Connection settings
	MaxIdleConns        int           `yaml:"max_idle_conns" json:"max_idle_conns"`                   // Max idle connections (default: 100)
	MaxIdleConnsPerHost int           `yaml:"max_idle_conns_per_host" json:"max_idle_conns_per_host"` // Max idle per host (default: 10)
	ConnectTimeout      time.Duration `yaml:"connect_timeout" json:"connect_timeout"`                 // Connection timeout (default: 30s)
	RequestTimeout      time.Duration `yaml:"request_timeout" json:"request_timeout"`                 // Request timeout (default: 60s)
}

EmbeddedMinIOConfig represents configuration for embedded MinIO server

func DefaultMinIOConfig

func DefaultMinIOConfig() *EmbeddedMinIOConfig

DefaultMinIOConfig returns modern default MinIO configuration

type MinIOFileSystem

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

MinIOFileSystem implements iceberg FileIO interface with embedded MinIO backend

func NewMinIOFileSystem

func NewMinIOFileSystem(minioServer *EmbeddedMinIO, bucket, prefix string) (*MinIOFileSystem, error)

NewMinIOFileSystem creates a new MinIO-backed FileSystem with modern configuration

func (*MinIOFileSystem) Create

func (fs *MinIOFileSystem) Create(location string) (io.File, error)

Create creates a new file for writing to MinIO with modern buffering

func (*MinIOFileSystem) Open

func (fs *MinIOFileSystem) Open(location string) (io.File, error)

Open opens a file for reading from MinIO with context support

func (*MinIOFileSystem) Remove

func (fs *MinIOFileSystem) Remove(location string) error

Remove removes a file from MinIO with context support

Jump to

Keyboard shortcuts

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