mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 21:14:56 +00:00
Refactor plugin management
Refactor plugin management: - support multiple plugins per executable - support restarting a plugin process in the event it terminates - simplify plugin lifecycle management by using separate managers for each scope (server vs backup vs restore) Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
committed by
Steve Kriss
parent
131afb571e
commit
130512187a
@@ -18,9 +18,10 @@ var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
type PutObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
|
||||
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PutObjectRequest) Reset() { *m = PutObjectRequest{} }
|
||||
@@ -28,6 +29,13 @@ func (m *PutObjectRequest) String() string { return proto.CompactText
|
||||
func (*PutObjectRequest) ProtoMessage() {}
|
||||
func (*PutObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
||||
|
||||
func (m *PutObjectRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PutObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -50,8 +58,9 @@ func (m *PutObjectRequest) GetBody() []byte {
|
||||
}
|
||||
|
||||
type GetObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetObjectRequest) Reset() { *m = GetObjectRequest{} }
|
||||
@@ -59,6 +68,13 @@ func (m *GetObjectRequest) String() string { return proto.CompactText
|
||||
func (*GetObjectRequest) ProtoMessage() {}
|
||||
func (*GetObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
||||
|
||||
func (m *GetObjectRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -90,8 +106,9 @@ func (m *Bytes) GetData() []byte {
|
||||
}
|
||||
|
||||
type ListCommonPrefixesRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Delimiter string `protobuf:"bytes,2,opt,name=delimiter" json:"delimiter,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Delimiter string `protobuf:"bytes,3,opt,name=delimiter" json:"delimiter,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListCommonPrefixesRequest) Reset() { *m = ListCommonPrefixesRequest{} }
|
||||
@@ -99,6 +116,13 @@ func (m *ListCommonPrefixesRequest) String() string { return proto.Co
|
||||
func (*ListCommonPrefixesRequest) ProtoMessage() {}
|
||||
func (*ListCommonPrefixesRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
|
||||
|
||||
func (m *ListCommonPrefixesRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ListCommonPrefixesRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -130,8 +154,9 @@ func (m *ListCommonPrefixesResponse) GetPrefixes() []string {
|
||||
}
|
||||
|
||||
type ListObjectsRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Prefix string `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Prefix string `protobuf:"bytes,3,opt,name=prefix" json:"prefix,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListObjectsRequest) Reset() { *m = ListObjectsRequest{} }
|
||||
@@ -139,6 +164,13 @@ func (m *ListObjectsRequest) String() string { return proto.CompactTe
|
||||
func (*ListObjectsRequest) ProtoMessage() {}
|
||||
func (*ListObjectsRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
|
||||
|
||||
func (m *ListObjectsRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ListObjectsRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -170,8 +202,9 @@ func (m *ListObjectsResponse) GetKeys() []string {
|
||||
}
|
||||
|
||||
type DeleteObjectRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteObjectRequest) Reset() { *m = DeleteObjectRequest{} }
|
||||
@@ -179,6 +212,13 @@ func (m *DeleteObjectRequest) String() string { return proto.CompactT
|
||||
func (*DeleteObjectRequest) ProtoMessage() {}
|
||||
func (*DeleteObjectRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} }
|
||||
|
||||
func (m *DeleteObjectRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeleteObjectRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -194,9 +234,10 @@ func (m *DeleteObjectRequest) GetKey() string {
|
||||
}
|
||||
|
||||
type CreateSignedURLRequest struct {
|
||||
Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
|
||||
Ttl int64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"`
|
||||
Plugin string `protobuf:"bytes,1,opt,name=plugin" json:"plugin,omitempty"`
|
||||
Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
|
||||
Ttl int64 `protobuf:"varint,4,opt,name=ttl" json:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLRequest) Reset() { *m = CreateSignedURLRequest{} }
|
||||
@@ -204,6 +245,13 @@ func (m *CreateSignedURLRequest) String() string { return proto.Compa
|
||||
func (*CreateSignedURLRequest) ProtoMessage() {}
|
||||
func (*CreateSignedURLRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{8} }
|
||||
|
||||
func (m *CreateSignedURLRequest) GetPlugin() string {
|
||||
if m != nil {
|
||||
return m.Plugin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateSignedURLRequest) GetBucket() string {
|
||||
if m != nil {
|
||||
return m.Bucket
|
||||
@@ -589,33 +637,34 @@ var _ObjectStore_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("ObjectStore.proto", fileDescriptor2) }
|
||||
|
||||
var fileDescriptor2 = []byte{
|
||||
// 444 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x8b, 0xd3, 0x40,
|
||||
0x10, 0xc7, 0x89, 0xa9, 0xc5, 0xcc, 0x15, 0x8c, 0x73, 0x50, 0x6b, 0x4e, 0xa5, 0x2e, 0x0a, 0x15,
|
||||
0xa1, 0x1c, 0xfa, 0xe2, 0xc3, 0x81, 0xe2, 0x9d, 0x88, 0x50, 0xb0, 0xa6, 0x0a, 0xbe, 0xa6, 0x97,
|
||||
0xf1, 0x8c, 0xcd, 0x2f, 0x37, 0x13, 0x30, 0xff, 0x81, 0x7f, 0xb6, 0x64, 0xb3, 0xc6, 0x4d, 0x2e,
|
||||
0x67, 0xf1, 0xde, 0x66, 0x67, 0xe7, 0xfb, 0x9d, 0xc9, 0xce, 0x87, 0xc0, 0x9d, 0x0f, 0xdb, 0xef,
|
||||
0x74, 0xce, 0x1b, 0xce, 0x24, 0x2d, 0x73, 0x99, 0x71, 0x86, 0xce, 0x05, 0xa5, 0x24, 0x03, 0xa6,
|
||||
0xd0, 0x9b, 0x6c, 0xbe, 0x05, 0x92, 0xc2, 0xe6, 0x42, 0xac, 0xc1, 0x5d, 0x97, 0xdc, 0x08, 0x7c,
|
||||
0xfa, 0x51, 0x52, 0xc1, 0x38, 0x85, 0xf1, 0xb6, 0x3c, 0xdf, 0x11, 0xcf, 0xac, 0xb9, 0xb5, 0x70,
|
||||
0x7c, 0x7d, 0x42, 0x17, 0xec, 0x1d, 0x55, 0xb3, 0x1b, 0x2a, 0x59, 0x87, 0x88, 0x30, 0xda, 0x66,
|
||||
0x61, 0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b,
|
||||
0x34, 0x62, 0x9c, 0x2e, 0x5b, 0x40, 0x97, 0x75, 0x42, 0x0f, 0xe6, 0xb9, 0x46, 0xfe, 0x6d, 0x92,
|
||||
0x73, 0x85, 0x27, 0xe0, 0xb4, 0xc0, 0xe2, 0x91, 0x71, 0xdd, 0xc7, 0xf8, 0xb2, 0x76, 0x61, 0xd5,
|
||||
0xea, 0x16, 0xce, 0x8e, 0xba, 0x8f, 0x6c, 0x47, 0xad, 0x88, 0x3c, 0xb6, 0x30, 0x68, 0x56, 0xde,
|
||||
0x85, 0x05, 0x1f, 0x1b, 0x95, 0x57, 0xe2, 0xe9, 0x3d, 0xd9, 0x53, 0xa5, 0x9f, 0x6c, 0x05, 0x07,
|
||||
0x06, 0x0f, 0xf8, 0xa0, 0xa7, 0xea, 0xd2, 0xe6, 0x3d, 0xbc, 0xea, 0x5a, 0xbb, 0xbd, 0x86, 0x89,
|
||||
0x89, 0x0c, 0x9a, 0xf5, 0x03, 0x2c, 0x0d, 0x3c, 0xf7, 0x17, 0xb8, 0xdd, 0xdb, 0x2e, 0x3e, 0x32,
|
||||
0x8a, 0x86, 0x79, 0xf2, 0xc4, 0xbf, 0x4a, 0x9a, 0xd9, 0xb6, 0x63, 0xf5, 0x03, 0x7a, 0xf1, 0x3b,
|
||||
0x00, 0x00, 0xff, 0xff, 0xf3, 0xb2, 0x85, 0x9a, 0xae, 0x04, 0x00, 0x00,
|
||||
// 459 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x51, 0x8b, 0xd3, 0x40,
|
||||
0x10, 0x26, 0x26, 0x1e, 0x66, 0xae, 0x60, 0x9c, 0x83, 0x1a, 0x73, 0x2a, 0x75, 0x51, 0xa8, 0x08,
|
||||
0xe5, 0xd0, 0x17, 0x1f, 0x7c, 0x10, 0x4f, 0x11, 0xa1, 0xe0, 0x91, 0x2a, 0xfa, 0xe0, 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2b, 0x9b, 0xc2, 0xa1, 0xe5, 0x1f, 0x7c,
|
||||
0xb0, 0xc1, 0xea, 0xbb, 0x36, 0x7a, 0x78, 0xd5, 0xb1, 0xe9, 0xf6, 0x1a, 0x06, 0xb6, 0xc5, 0xd0,
|
||||
0xae, 0xdf, 0xe2, 0xbd, 0x2d, 0xd7, 0xfd, 0x15, 0x6e, 0x6f, 0xbc, 0x2e, 0x3e, 0xb2, 0x8a, 0xb6,
|
||||
0xfb, 0x2c, 0x12, 0xff, 0x2b, 0xe9, 0xb4, 0xcd, 0x0f, 0xf4, 0x0f, 0xf1, 0xc5, 0x9f, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x59, 0xaf, 0x2a, 0xa0, 0x3e, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user