Documentation
¶
Index ¶
- Constants
- Variables
- func RestorePhysicalSnapshot(ctx context.Context, opts RestoreOptions) (*etcdraftengine.ExternalSnapshotRestoreResult, error)
- func ValidateKMSKeyID(value string) error
- func ValidateS3StoreEncryption(encryption, kmsKeyID string) error
- type LocalStore
- func (s *LocalStore) GetObject(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error)
- func (s *LocalStore) HeadObject(ctx context.Context, key string) (ObjectInfo, bool, error)
- func (s *LocalStore) PutObject(ctx context.Context, key string, body io.Reader, opts PutOptions) (ObjectInfo, error)
- type Manifest
- type ManifestConfState
- type ObjectInfo
- type ObjectStore
- type PayloadDescriptor
- type PublishOptions
- type PutOptions
- type RestoreOptions
- type S3ObjectClient
- type S3Store
- type S3StoreConfig
Constants ¶
View Source
const (
ManifestSchemaVersion = 1
)
Variables ¶
Functions ¶
func RestorePhysicalSnapshot ¶
func RestorePhysicalSnapshot(ctx context.Context, opts RestoreOptions) (*etcdraftengine.ExternalSnapshotRestoreResult, error)
func ValidateKMSKeyID ¶
ValidateKMSKeyID accepts canonical key ARNs and bare key IDs. Aliases are rejected because S3 reports the resolved key identity, not the alias string.
Types ¶
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
func NewLocalStore ¶
func NewLocalStore(root string) (*LocalStore, error)
func (*LocalStore) GetObject ¶
func (s *LocalStore) GetObject(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error)
func (*LocalStore) HeadObject ¶
func (s *LocalStore) HeadObject(ctx context.Context, key string) (ObjectInfo, bool, error)
func (*LocalStore) PutObject ¶
func (s *LocalStore) PutObject(ctx context.Context, key string, body io.Reader, opts PutOptions) (ObjectInfo, error)
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schema_version"`
CreatedAt time.Time `json:"created_at"`
SourceCluster string `json:"source_cluster,omitempty"`
GroupID uint64 `json:"group_id"`
SnapshotIndex uint64 `json:"snapshot_index"`
SnapshotTerm uint64 `json:"snapshot_term"`
ConfState ManifestConfState `json:"conf_state"`
Payload PayloadDescriptor `json:"payload"`
BinaryVersion string `json:"binary_version,omitempty"`
ManifestKey string `json:"manifest_key"`
ManifestSHA256 string `json:"manifest_sha256,omitempty"`
}
func DecodeManifest ¶
func LoadManifest ¶
func PublishPersistedSnapshot ¶
func PublishPersistedSnapshot(ctx context.Context, opts PublishOptions) (*Manifest, error)
type ManifestConfState ¶
type ObjectInfo ¶
type ObjectStore ¶
type ObjectStore interface {
PutObject(ctx context.Context, key string, body io.Reader, opts PutOptions) (ObjectInfo, error)
GetObject(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error)
HeadObject(ctx context.Context, key string) (ObjectInfo, bool, error)
}
type PayloadDescriptor ¶
type PublishOptions ¶
type PutOptions ¶
type RestoreOptions ¶
type RestoreOptions struct {
Store ObjectStore
ManifestKey string
Manifest *Manifest
DataDir string
Peers []etcdraftengine.Peer
}
type S3ObjectClient ¶
type S3ObjectClient interface {
PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error)
GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
HeadObject(context.Context, *s3.HeadObjectInput, ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
CreateMultipartUpload(context.Context, *s3.CreateMultipartUploadInput, ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error)
UploadPart(context.Context, *s3.UploadPartInput, ...func(*s3.Options)) (*s3.UploadPartOutput, error)
CompleteMultipartUpload(context.Context, *s3.CompleteMultipartUploadInput, ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error)
AbortMultipartUpload(context.Context, *s3.AbortMultipartUploadInput, ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error)
}
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
func NewS3Store ¶
func NewS3Store(ctx context.Context, cfg S3StoreConfig) (*S3Store, error)
func (*S3Store) GetObject ¶
func (s *S3Store) GetObject(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error)
func (*S3Store) HeadObject ¶
Click to show internal directories.
Click to hide internal directories.