Documentation
¶
Index ¶
- Constants
- Variables
- func GetPlanFileName(run *model.ResourceRun) string
- func IsConnected(ctx context.Context) error
- func Wait(ctx context.Context, serverUrl string) (err error)
- type Config
- type Embedded
- type Manager
- func (m *Manager) CheckValidBucketName(ctx context.Context, bucketName string) error
- func (m *Manager) DeleteRunPlan(ctx context.Context, run *model.ResourceRun) error
- func (m *Manager) GetAddress() string
- func (m *Manager) GetRunPlan(ctx context.Context, run *model.ResourceRun) ([]byte, error)
- func (m *Manager) SetRunPlan(ctx context.Context, run *model.ResourceRun, plan []byte) error
Constants ¶
View Source
const DefaultS3SourceAddress = "s3://minio:minio123@localhost:9000/walrus?sslmode=disable"
Variables ¶
View Source
var ErrInvalidFormat = errors.New("invalid s3 credential format")
ErrInvalidFormat is returned when the provided s3 credential is not in the expected format.
Functions ¶
func GetPlanFileName ¶
func GetPlanFileName(run *model.ResourceRun) string
func IsConnected ¶
Types ¶
type Config ¶
type Config struct { Endpoint string // Default region will be us-east-1. // https://github.com/minio/minio-go/blob/e8ddcf0238962d766f44242b595511f4decd365c/api-put-bucket.go#L37. Region string Bucket string Secure bool AccessKeyID string SecretAccessKey string }
Config contains all configuration necessary to connect to an s3 compatible server.
func ParseConfig ¶
ParseConfig parses the string s and extracts the s3 credentail. The supported format is: s3://ak:sk@endpoint/bucket?region=ap-northeast-1&sslmode=disable.
func (*Config) GetAddress ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates a new storage manager.
func (*Manager) CheckValidBucketName ¶
func (*Manager) DeleteRunPlan ¶
func (*Manager) GetAddress ¶
func (*Manager) GetRunPlan ¶
func (*Manager) SetRunPlan ¶
SetRunPlan sets the run plan files to s3 storage.
Click to show internal directories.
Click to hide internal directories.