objstore

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 15 Imported by: 0

README

Environment based configuration

  • S3_ENDPOINT default: "s3.amazonaws.com"
    • host:port address.
  • S3_ACCESS_KEY_ID
    • Access Key ID for the service.
  • S3_SECRET_ACCESS_KEY
    • Secret Access Key for the service.
  • S3_USE_SSL
    • Determine whether to use SSL or not.
  • S3_REGION default: "us-east-1"
    • S3 region for the bucket.
  • S3_HEALTH_CHECK_BUCKET_NAME default: health-check
    • Name of the bucket that is used for health check operations.
  • S3_HEALTH_CHECK_OBJECT_NAME default: "latest.log
    • Name of the object that is used for the health check operation.
  • S3_HEALTH_CHECK_RESULT_TTL default: 10s
    • Amount of time to cache the last health check result.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() (*minio.Client, error)

deprecated consider using DefaultClientFromEnv

func CustomClient

func CustomClient(endpoint string, opts *minio.Options) (*minio.Client, error)

CustomClient with customized client

func DefaultClientFromEnv added in v0.1.76

func DefaultClientFromEnv() (*minio.Client, error)

Client with environment based configuration. Registers healthchecks automatically. If yo do not want to use healthchecks consider calling CustomClient.

func RegisterHealthchecks added in v0.1.76

func RegisterHealthchecks()

Types

type HealthCheck

type HealthCheck struct {
	Client *minio.Client
	// contains filtered or unexported fields
}

HealthCheck checks the state of the object storage client. It must not be changed after it was registered as a health check.

func (*HealthCheck) HealthCheck

HealthCheck checks if the object storage client is healthy. If the last result is outdated, object storage is checked for upload and download, otherwise returns the old result

Jump to

Keyboard shortcuts

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