diff --git a/api/v1alpha1/envoy_plugin.pb.go b/api/v1alpha1/envoy_plugin.pb.go index d46132f..a46afc0 100644 --- a/api/v1alpha1/envoy_plugin.pb.go +++ b/api/v1alpha1/envoy_plugin.pb.go @@ -1,27 +1,24 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/apis/microservice/v1alpha1/envoy_plugin.proto +// source: envoy_plugin.proto package v1alpha1 import ( fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // `WorkloadSelector` specifies the criteria used to determine if the // `Gateway`, `Sidecar`, or `EnvoyFilter` or `ServiceEntry` @@ -47,25 +44,20 @@ func (m *WorkloadSelector) Reset() { *m = WorkloadSelector{} } func (m *WorkloadSelector) String() string { return proto.CompactTextString(m) } func (*WorkloadSelector) ProtoMessage() {} func (*WorkloadSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_35868063e6636962, []int{0} + return fileDescriptor_c5a818f331e9d367, []int{0} } - func (m *WorkloadSelector) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WorkloadSelector.Unmarshal(m, b) } - func (m *WorkloadSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_WorkloadSelector.Marshal(b, m, deterministic) } - func (m *WorkloadSelector) XXX_Merge(src proto.Message) { xxx_messageInfo_WorkloadSelector.Merge(m, src) } - func (m *WorkloadSelector) XXX_Size() int { return xxx_messageInfo_WorkloadSelector.Size(m) } - func (m *WorkloadSelector) XXX_DiscardUnknown() { xxx_messageInfo_WorkloadSelector.DiscardUnknown(m) } @@ -105,25 +97,20 @@ func (m *EnvoyPlugin) Reset() { *m = EnvoyPlugin{} } func (m *EnvoyPlugin) String() string { return proto.CompactTextString(m) } func (*EnvoyPlugin) ProtoMessage() {} func (*EnvoyPlugin) Descriptor() ([]byte, []int) { - return fileDescriptor_35868063e6636962, []int{1} + return fileDescriptor_c5a818f331e9d367, []int{1} } - func (m *EnvoyPlugin) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EnvoyPlugin.Unmarshal(m, b) } - func (m *EnvoyPlugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_EnvoyPlugin.Marshal(b, m, deterministic) } - func (m *EnvoyPlugin) XXX_Merge(src proto.Message) { xxx_messageInfo_EnvoyPlugin.Merge(m, src) } - func (m *EnvoyPlugin) XXX_Size() int { return xxx_messageInfo_EnvoyPlugin.Size(m) } - func (m *EnvoyPlugin) XXX_DiscardUnknown() { xxx_messageInfo_EnvoyPlugin.DiscardUnknown(m) } @@ -205,25 +192,20 @@ func (m *EnvoyPlugin_Listener) Reset() { *m = EnvoyPlugin_Listener{} } func (m *EnvoyPlugin_Listener) String() string { return proto.CompactTextString(m) } func (*EnvoyPlugin_Listener) ProtoMessage() {} func (*EnvoyPlugin_Listener) Descriptor() ([]byte, []int) { - return fileDescriptor_35868063e6636962, []int{1, 0} + return fileDescriptor_c5a818f331e9d367, []int{1, 0} } - func (m *EnvoyPlugin_Listener) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EnvoyPlugin_Listener.Unmarshal(m, b) } - func (m *EnvoyPlugin_Listener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_EnvoyPlugin_Listener.Marshal(b, m, deterministic) } - func (m *EnvoyPlugin_Listener) XXX_Merge(src proto.Message) { xxx_messageInfo_EnvoyPlugin_Listener.Merge(m, src) } - func (m *EnvoyPlugin_Listener) XXX_Size() int { return xxx_messageInfo_EnvoyPlugin_Listener.Size(m) } - func (m *EnvoyPlugin_Listener) XXX_DiscardUnknown() { xxx_messageInfo_EnvoyPlugin_Listener.DiscardUnknown(m) } @@ -245,42 +227,40 @@ func (m *EnvoyPlugin_Listener) GetOutbound() bool { } func init() { - proto.RegisterType((*WorkloadSelector)(nil), "slime.microservice.v1alpha1.WorkloadSelector") - proto.RegisterMapType((map[string]string)(nil), "slime.microservice.v1alpha1.WorkloadSelector.LabelsEntry") - proto.RegisterType((*EnvoyPlugin)(nil), "slime.microservice.v1alpha1.EnvoyPlugin") - proto.RegisterType((*EnvoyPlugin_Listener)(nil), "slime.microservice.v1alpha1.EnvoyPlugin.Listener") -} - -func init() { - proto.RegisterFile("pkg/apis/microservice/v1alpha1/envoy_plugin.proto", fileDescriptor_35868063e6636962) -} - -var fileDescriptor_35868063e6636962 = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xc1, 0x6a, 0xdb, 0x40, - 0x10, 0x45, 0x76, 0x6c, 0xcb, 0x63, 0x5a, 0xdc, 0x25, 0x87, 0xc5, 0xbd, 0x88, 0x14, 0x8a, 0x2e, - 0x91, 0x50, 0x72, 0x69, 0x02, 0xbd, 0x14, 0x42, 0x2f, 0x29, 0xb4, 0x9b, 0x43, 0x21, 0x17, 0xb3, - 0x76, 0x06, 0x65, 0xf1, 0x5a, 0x2b, 0x76, 0x57, 0x32, 0xfa, 0x9b, 0xfe, 0x50, 0xff, 0xa9, 0x68, - 0x57, 0x32, 0xc6, 0x07, 0x95, 0xdc, 0xe6, 0x3d, 0x76, 0xde, 0x7b, 0x33, 0x3b, 0x90, 0x95, 0xbb, - 0x3c, 0xe5, 0xa5, 0x30, 0xe9, 0x5e, 0x6c, 0xb5, 0x32, 0xa8, 0x6b, 0xb1, 0xc5, 0xb4, 0xce, 0xb8, - 0x2c, 0x5f, 0x79, 0x96, 0x62, 0x51, 0xab, 0x66, 0x5d, 0xca, 0x2a,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0xfc, 0x54, - 0xac, 0xef, 0x69, 0x85, 0x73, 0x6e, 0xf1, 0xc0, 0x1b, 0x3a, 0xf1, 0xc2, 0x1d, 0x6c, 0x63, 0x54, - 0x06, 0x35, 0x9d, 0xfa, 0x18, 0x6d, 0x4d, 0x3e, 0xc3, 0x7b, 0x61, 0xbe, 0x6b, 0x55, 0x95, 0x4f, - 0x68, 0xad, 0x28, 0x72, 0x3a, 0x8b, 0x82, 0x38, 0x64, 0x67, 0x2c, 0xf9, 0x01, 0xa1, 0x14, 0xc6, - 0x62, 0x81, 0x9a, 0x86, 0x2e, 0x55, 0x36, 0x98, 0xea, 0x64, 0xe1, 0xc9, 0x63, 0xd7, 0xc8, 0x8e, - 0x12, 0xab, 0x7b, 0x08, 0x7b, 0xb6, 0x8d, 0x55, 0x2a, 0x6d, 0xdd, 0x67, 0xbe, 0x63, 0xae, 0x26, - 0x2b, 0x08, 0x55, 0x65, 0x37, 0xaa, 0x2a, 0x5e, 0xdc, 0x87, 0x86, 0xec, 0x88, 0xbf, 0xa5, 0xcf, - 0xd7, 0xde, 0x59, 0xa8, 0xd4, 0x15, 0xe9, 0xf0, 0xe1, 0x6e, 0xa6, 0xee, 0x54, 0x6f, 0xff, 0x05, - 0x00, 0x00, 0xff, 0xff, 0x35, 0x69, 0xa0, 0x91, 0x31, 0x03, 0x00, 0x00, + proto.RegisterType((*WorkloadSelector)(nil), "slime.microservice.plugin.v1alpha1.WorkloadSelector") + proto.RegisterMapType((map[string]string)(nil), "slime.microservice.plugin.v1alpha1.WorkloadSelector.LabelsEntry") + proto.RegisterType((*EnvoyPlugin)(nil), "slime.microservice.plugin.v1alpha1.EnvoyPlugin") + proto.RegisterType((*EnvoyPlugin_Listener)(nil), "slime.microservice.plugin.v1alpha1.EnvoyPlugin.Listener") +} + +func init() { proto.RegisterFile("envoy_plugin.proto", fileDescriptor_c5a818f331e9d367) } + +var fileDescriptor_c5a818f331e9d367 = []byte{ + // 410 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x6a, 0xdb, 0x40, + 0x10, 0xc6, 0x91, 0x1d, 0xdb, 0xf2, 0x98, 0x16, 0x77, 0xf1, 0x61, 0xf1, 0x49, 0xf8, 0x50, 0x44, + 0x28, 0x12, 0x49, 0x7b, 0x48, 0x73, 0x2a, 0xa5, 0xa1, 0x97, 0x1c, 0xca, 0xa6, 0xd0, 0xd2, 0x8b, + 0x59, 0xdb, 0x83, 0xb2, 0x64, 0xa5, 0x15, 0xfb, 0x47, 0x46, 0x4f, 0xd4, 0xf7, 0xea, 0x93, 0x14, + 0xed, 0x4a, 0x21, 0xf8, 0x52, 0xd3, 0xdb, 0xcc, 0x87, 0xe6, 0xfb, 0x7e, 0x3b, 0x23, 0x20, 0x58, + 0x35, 0xaa, 0xdd, 0xd6, 0xd2, 0x15, 0xa2, 0xca, 0x6a, 0xad, 0xac, 0x22, 0x1b, 0x23, 0x45, 0x89, + 0x59, 0x29, 0xf6, 0x5a, 0x19, 0xd4, 0x8d, 0xd8, 0x63, 0xd6, 0x7f, 0xd0, 0x5c, 0x71, 0x59, 0x3f, + 0xf2, 0xab, 0xf5, 0x2a, 0x08, 0xdb, 0x92, 0x57, 0xbc, 0x40, 0x1d, 0x26, 0x37, 0xbf, 0x23, 0x58, + 0xfe, 0x50, 0xfa, 0x49, 0x2a, 0x7e, 0x78, 0x40, 0x89, 0x7b, 0xab, 0x34, 0xf9, 0x09, 0x53, 0xc9, + 0x77, 0x28, 0x0d, 0x8d, 0x92, 0x71, 0xba, 0xb8, 0xfe, 0x94, 0xfd, 0xdb, 0x3f, 0x3b, 0x75, 0xc9, + 0xee, 0xbd, 0xc5, 0x5d, 0x65, 0x75, 0xcb, 0x7a, 0xbf, 0xf5, 0x47, 0x58, 0xbc, 0x90, 0xc9, 0x12, + 0xc6, 0x4f, 0xd8, 0xd2, 0x28, 0x89, 0xd2, 0x39, 0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xf8, 0x2b, 0xc7, 0xec, 0xb9, + 0xff, 0xfc, 0xee, 0xd7, 0x65, 0x00, 0x10, 0x2a, 0xf7, 0x45, 0x5e, 0xaa, 0x83, 0x93, 0x68, 0xf2, + 0x00, 0x91, 0xf3, 0x5a, 0xe4, 0x03, 0xc8, 0x6e, 0xea, 0xff, 0xe1, 0xf7, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xdf, 0x95, 0x9b, 0xb4, 0x13, 0x03, 0x00, 0x00, } diff --git a/api/v1alpha1/envoy_plugin.proto b/api/v1alpha1/envoy_plugin.proto index f5c3e74..e12f312 100644 --- a/api/v1alpha1/envoy_plugin.proto +++ b/api/v1alpha1/envoy_plugin.proto @@ -37,9 +37,9 @@ syntax = "proto3"; // :path: // text: /{{$1}} // parse_body_behavior: DontParse -import "pkg/apis/microservice/v1alpha1/plugin_manager.proto"; +import "plugin_manager.proto"; -package slime.microservice.v1alpha1; +package slime.microservice.plugin.v1alpha1; option go_package = "slime.io/slime/modules/plugin/api/v1alpha1"; diff --git a/api/v1alpha1/plugin_manager.pb.go b/api/v1alpha1/plugin_manager.pb.go index b0f5319..620e426 100644 --- a/api/v1alpha1/plugin_manager.pb.go +++ b/api/v1alpha1/plugin_manager.pb.go @@ -1,28 +1,25 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/apis/microservice/v1alpha1/plugin_manager.proto +// source: plugin_manager.proto package v1alpha1 import ( fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Plugin_ListenerType int32 @@ -46,7 +43,7 @@ func (x Plugin_ListenerType) String() string { } func (Plugin_ListenerType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3b828c45d9f521e4, []int{1, 0} + return fileDescriptor_58d89e785e3ecf0c, []int{1, 0} } type PluginManager struct { @@ -71,25 +68,20 @@ func (m *PluginManager) Reset() { *m = PluginManager{} } func (m *PluginManager) String() string { return proto.CompactTextString(m) } func (*PluginManager) ProtoMessage() {} func (*PluginManager) Descriptor() ([]byte, []int) { - return fileDescriptor_3b828c45d9f521e4, []int{0} + return fileDescriptor_58d89e785e3ecf0c, []int{0} } - func (m *PluginManager) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PluginManager.Unmarshal(m, b) } - func (m *PluginManager) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PluginManager.Marshal(b, m, deterministic) } - func (m *PluginManager) XXX_Merge(src proto.Message) { xxx_messageInfo_PluginManager.Merge(m, src) } - func (m *PluginManager) XXX_Size() int { return xxx_messageInfo_PluginManager.Size(m) } - func (m *PluginManager) XXX_DiscardUnknown() { xxx_messageInfo_PluginManager.DiscardUnknown(m) } @@ -122,7 +114,7 @@ type Plugin struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Deprecated Settings *types.Struct `protobuf:"bytes,3,opt,name=settings,proto3" json:"settings,omitempty"` - ListenerType Plugin_ListenerType `protobuf:"varint,4,opt,name=listenerType,proto3,enum=slime.microservice.v1alpha1.Plugin_ListenerType" json:"listenerType,omitempty"` + ListenerType Plugin_ListenerType `protobuf:"varint,4,opt,name=listenerType,proto3,enum=slime.microservice.plugin.v1alpha1.Plugin_ListenerType" json:"listenerType,omitempty"` TypeUrl string `protobuf:"bytes,5,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Types that are valid to be assigned to PluginSettings: // *Plugin_Wasm @@ -137,25 +129,20 @@ func (m *Plugin) Reset() { *m = Plugin{} } func (m *Plugin) String() string { return proto.CompactTextString(m) } func (*Plugin) ProtoMessage() {} func (*Plugin) Descriptor() ([]byte, []int) { - return fileDescriptor_3b828c45d9f521e4, []int{1} + return fileDescriptor_58d89e785e3ecf0c, []int{1} } - func (m *Plugin) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Plugin.Unmarshal(m, b) } - func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Plugin.Marshal(b, m, deterministic) } - func (m *Plugin) XXX_Merge(src proto.Message) { xxx_messageInfo_Plugin.Merge(m, src) } - func (m *Plugin) XXX_Size() int { return xxx_messageInfo_Plugin.Size(m) } - func (m *Plugin) XXX_DiscardUnknown() { xxx_messageInfo_Plugin.DiscardUnknown(m) } @@ -167,11 +154,10 @@ type isPlugin_PluginSettings interface { } type Plugin_Wasm struct { - Wasm *Wasm `protobuf:"bytes,6,opt,name=wasm,proto3,oneof"` + Wasm *Wasm `protobuf:"bytes,6,opt,name=wasm,proto3,oneof" json:"wasm,omitempty"` } - type Plugin_Inline struct { - Inline *Inline `protobuf:"bytes,7,opt,name=inline,proto3,oneof"` + Inline *Inline `protobuf:"bytes,7,opt,name=inline,proto3,oneof" json:"inline,omitempty"` } func (*Plugin_Wasm) isPlugin_PluginSettings() {} @@ -233,80 +219,14 @@ func (m *Plugin) GetInline() *Inline { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Plugin) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Plugin_OneofMarshaler, _Plugin_OneofUnmarshaler, _Plugin_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Plugin) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*Plugin_Wasm)(nil), (*Plugin_Inline)(nil), } } -func _Plugin_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Plugin) - // plugin_settings - switch x := m.PluginSettings.(type) { - case *Plugin_Wasm: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Wasm); err != nil { - return err - } - case *Plugin_Inline: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Inline); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Plugin.PluginSettings has unexpected type %T", x) - } - return nil -} - -func _Plugin_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Plugin) - switch tag { - case 6: // plugin_settings.wasm - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Wasm) - err := b.DecodeMessage(msg) - m.PluginSettings = &Plugin_Wasm{msg} - return true, err - case 7: // plugin_settings.inline - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Inline) - err := b.DecodeMessage(msg) - m.PluginSettings = &Plugin_Inline{msg} - return true, err - default: - return false, nil - } -} - -func _Plugin_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Plugin) - // plugin_settings - switch x := m.PluginSettings.(type) { - case *Plugin_Wasm: - s := proto.Size(x.Wasm) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Plugin_Inline: - s := proto.Size(x.Inline) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type Wasm struct { RootID string `protobuf:"bytes,1,opt,name=rootID,proto3" json:"rootID,omitempty"` FileName string `protobuf:"bytes,2,opt,name=fileName,proto3" json:"fileName,omitempty"` @@ -320,25 +240,20 @@ func (m *Wasm) Reset() { *m = Wasm{} } func (m *Wasm) String() string { return proto.CompactTextString(m) } func (*Wasm) ProtoMessage() {} func (*Wasm) Descriptor() ([]byte, []int) { - return fileDescriptor_3b828c45d9f521e4, []int{2} + return fileDescriptor_58d89e785e3ecf0c, []int{2} } - func (m *Wasm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Wasm.Unmarshal(m, b) } - func (m *Wasm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Wasm.Marshal(b, m, deterministic) } - func (m *Wasm) XXX_Merge(src proto.Message) { xxx_messageInfo_Wasm.Merge(m, src) } - func (m *Wasm) XXX_Size() int { return xxx_messageInfo_Wasm.Size(m) } - func (m *Wasm) XXX_DiscardUnknown() { xxx_messageInfo_Wasm.DiscardUnknown(m) } @@ -377,25 +292,20 @@ func (m *Inline) Reset() { *m = Inline{} } func (m *Inline) String() string { return proto.CompactTextString(m) } func (*Inline) ProtoMessage() {} func (*Inline) Descriptor() ([]byte, []int) { - return fileDescriptor_3b828c45d9f521e4, []int{3} + return fileDescriptor_58d89e785e3ecf0c, []int{3} } - func (m *Inline) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Inline.Unmarshal(m, b) } - func (m *Inline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Inline.Marshal(b, m, deterministic) } - func (m *Inline) XXX_Merge(src proto.Message) { xxx_messageInfo_Inline.Merge(m, src) } - func (m *Inline) XXX_Size() int { return xxx_messageInfo_Inline.Size(m) } - func (m *Inline) XXX_DiscardUnknown() { xxx_messageInfo_Inline.DiscardUnknown(m) } @@ -410,49 +320,47 @@ func (m *Inline) GetSettings() *types.Struct { } func init() { - proto.RegisterEnum("slime.microservice.v1alpha1.Plugin_ListenerType", Plugin_ListenerType_name, Plugin_ListenerType_value) - proto.RegisterType((*PluginManager)(nil), "slime.microservice.v1alpha1.PluginManager") - proto.RegisterMapType((map[string]string)(nil), "slime.microservice.v1alpha1.PluginManager.WorkloadLabelsEntry") - proto.RegisterType((*Plugin)(nil), "slime.microservice.v1alpha1.Plugin") - proto.RegisterType((*Wasm)(nil), "slime.microservice.v1alpha1.Wasm") - proto.RegisterType((*Inline)(nil), "slime.microservice.v1alpha1.Inline") + proto.RegisterEnum("slime.microservice.plugin.v1alpha1.Plugin_ListenerType", Plugin_ListenerType_name, Plugin_ListenerType_value) + proto.RegisterType((*PluginManager)(nil), "slime.microservice.plugin.v1alpha1.PluginManager") + proto.RegisterMapType((map[string]string)(nil), "slime.microservice.plugin.v1alpha1.PluginManager.WorkloadLabelsEntry") + proto.RegisterType((*Plugin)(nil), "slime.microservice.plugin.v1alpha1.Plugin") + proto.RegisterType((*Wasm)(nil), "slime.microservice.plugin.v1alpha1.Wasm") + proto.RegisterType((*Inline)(nil), "slime.microservice.plugin.v1alpha1.Inline") } -func init() { - proto.RegisterFile("pkg/apis/microservice/v1alpha1/plugin_manager.proto", fileDescriptor_3b828c45d9f521e4) -} +func init() { proto.RegisterFile("plugin_manager.proto", fileDescriptor_58d89e785e3ecf0c) } -var fileDescriptor_3b828c45d9f521e4 = []byte{ +var fileDescriptor_58d89e785e3ecf0c = []byte{ // 491 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x5f, 0x6f, 0xd3, 0x30, - 0x14, 0xc5, 0x9b, 0xb6, 0x4b, 0xbb, 0xdb, 0xb2, 0x0d, 0x83, 0x20, 0x14, 0x1e, 0x4a, 0x78, 0x09, - 0x0f, 0x38, 0xac, 0x7d, 0x00, 0x81, 0x86, 0xc4, 0x04, 0xd2, 0x2a, 0x8d, 0x3f, 0x0a, 0x43, 0x93, - 0x78, 0xa9, 0x9c, 0xce, 0x0b, 0x56, 0x1d, 0x3b, 0xb2, 0x9d, 0x56, 0xf9, 0x16, 0x3c, 0xf0, 0x81, - 0x51, 0x9c, 0xb4, 0xb4, 0x12, 0xaa, 0x2a, 0xde, 0x7c, 0xa2, 0xfb, 0x3b, 0xf7, 0xfa, 0x5c, 0x07, - 0xc6, 0xd9, 0x3c, 0x09, 0x49, 0xc6, 0x74, 0x98, 0xb2, 0x99, 0x92, 0x9a, 0xaa, 0x05, 0x9b, 0xd1, - 0x70, 0x71, 0x4a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f3, 0xf0, 0xc7, 0x8b, - 0x2a, 0x1d, 0x26, 0x43, 0x7b, 0x08, 0x77, 0xff, 0xda, 0xb1, 0x6b, 0xbd, 0xc6, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x4b, 0xf7, 0xf9, 0x3b, 0x03, 0x04, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x5f, 0x6b, 0xdb, 0x30, + 0x14, 0xc5, 0xeb, 0x24, 0x75, 0xd2, 0x9b, 0xac, 0xed, 0xb4, 0xb2, 0x79, 0x61, 0x0f, 0xc1, 0x4f, + 0x5e, 0x19, 0x32, 0x4d, 0x1f, 0x36, 0x06, 0x1b, 0x2c, 0xb4, 0xd0, 0x40, 0xf7, 0x07, 0x6f, 0xa3, + 0xb0, 0x3d, 0x04, 0x25, 0x51, 0x3d, 0x51, 0x59, 0x32, 0x92, 0x9c, 0xe0, 0xaf, 0x33, 0xd8, 0xf7, + 0x1c, 0x96, 0x9c, 0xac, 0x81, 0xc1, 0xcc, 0xde, 0xee, 0x11, 0xfa, 0x9d, 0x7b, 0x75, 0x8f, 0x0d, + 0x27, 0x39, 0x2f, 0x52, 0x26, 0x66, 0x19, 0x11, 0x24, 0xa5, 0x0a, 0xe7, 0x4a, 0x1a, 0x89, 0x42, + 0xcd, 0x59, 0x46, 0x71, 0xc6, 0x16, 0x4a, 0x6a, 0xaa, 0x56, 0x6c, 0x41, 0xb1, 0xbb, 0x88, 0x57, + 0x67, 0x84, 0xe7, 0x3f, 0xc8, 0xd9, 0xf0, 0x59, 0x2a, 0x65, 0xca, 0x69, 0x6c, 0x89, 0x79, 0x71, + 0x1b, 0x6b, 0xa3, 0x8a, 0x85, 0x71, 0x0e, 0xe1, 0xcf, 0x16, 0x3c, 0xf8, 0x64, 0x89, 0xf7, 0xce, + 0x19, 0x09, 0x38, 0x5a, 0x4b, 0x75, 0xc7, 0x25, 0x59, 0x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 0x27, 0xed, 0x56, 0xfa, 0xab, 0xe2, 0xe8, 0x2d, 0x74, 0xd6, 0x44, 0x67, 0x81, 0x6f, 0x07, 0x8d, + 0x9a, 0xf4, 0xbb, 0x21, 0x3a, 0xbb, 0xda, 0x4b, 0x2c, 0x87, 0x2e, 0xc0, 0x67, 0x82, 0x33, 0x41, + 0x83, 0xae, 0x75, 0x68, 0x14, 0xe3, 0xd4, 0x12, 0x57, 0x7b, 0x49, 0xcd, 0x86, 0xcf, 0x61, 0x70, + 0x7f, 0x7c, 0x34, 0x80, 0xde, 0xc7, 0xc2, 0xcc, 0x65, 0x21, 0x96, 0xc7, 0x7b, 0xa8, 0x0f, 0xdd, + 0xa9, 0x70, 0xc2, 0x9b, 0x3c, 0x84, 0xa3, 0xfa, 0x9f, 0xd8, 0xec, 0x2e, 0x94, 0xd0, 0xa9, 0x66, + 0xaa, 0x42, 0x52, 0x52, 0x9a, 0xe9, 0x45, 0x1d, 0x6f, 0xad, 0xaa, 0xcf, 0xe4, 0x96, 0x71, 0xfa, + 0xe1, 0x4f, 0x50, 0x5b, 0xfd, 0x5f, 0x61, 0x85, 0x6f, 0xc0, 0x77, 0x4f, 0xd8, 0xc1, 0xbd, 0x86, + 0xf8, 0xe4, 0xc5, 0xb7, 0x53, 0xb7, 0x24, 0x26, 0x63, 0x5b, 0xc4, 0x99, 0x5c, 0x16, 0x9c, 0xea, + 0xd8, 0xbd, 0x2c, 0x26, 0x39, 0x8b, 0x37, 0xcb, 0x9a, 0xfb, 0xd6, 0xe8, 0xfc, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xd7, 0xac, 0xdd, 0x62, 0x0b, 0x04, 0x00, 0x00, } diff --git a/api/v1alpha1/plugin_manager.proto b/api/v1alpha1/plugin_manager.proto index 34bb502..dab0fdb 100644 --- a/api/v1alpha1/plugin_manager.proto +++ b/api/v1alpha1/plugin_manager.proto @@ -43,9 +43,9 @@ syntax = "proto3"; import "google/protobuf/struct.proto"; -package slime.microservice.v1alpha1; +package slime.microservice.plugin.v1alpha1; -option go_package = "slime.io/slime/pkg/apis/microservice/v1alpha1"; +option go_package = "slime.io/slime/modules/plugin/api/v1alpha1"; message PluginManager { // Zero or more labels that indicate a specific set of pods/VMs whose diff --git a/go.mod b/go.mod index c620eba..9a11c19 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,6 @@ replace ( k8s.io/api => k8s.io/api v0.17.2 k8s.io/apimachinery => k8s.io/apimachinery v0.17.2 - slime.io/slime/framework v0.0.0 => github.com/slime-io/slime/framework v0.3.1 - //slime.io/slime/framework => ../slime/framework + slime.io/slime/framework v0.0.0 => github.com/slime-io/slime/framework v0.3.6 +//slime.io/slime/framework => ../slime/framework ) diff --git a/go.sum b/go.sum index 7d87e2e..b07b35f 100644 --- a/go.sum +++ b/go.sum @@ -292,7 +292,8 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/slime-io/slime/framework v0.3.1/go.mod h1:Arv+tpfmdWWzxEBYHnhj9FZEgcLH+mYo5KumxMKrHqg= +github.com/slime-io/slime/framework v0.3.6 h1:BpuVuIQx+gF8pyRslrJL5d7u3LTGNJi/kQC9MOwY004= +github.com/slime-io/slime/framework v0.3.6/go.mod h1:ZdGUonMTHodDCn6mBTFuoyh5vAKL4mkSrdxdYhqXles= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=