Documentation
¶
Index ¶
- Variables
- func GetPluginMap(pluginName string) map[string]goplugin.Plugin
- func RegisterGatewayDPluginServiceServer(s grpc.ServiceRegistrar, srv GatewayDPluginServiceServer)
- type GatewayDPluginServiceClient
- type GatewayDPluginServiceServer
- type Plugin
- type PluginConfig
- func (*PluginConfig) Descriptor() ([]byte, []int)deprecated
- func (x *PluginConfig) GetAuthors() []string
- func (x *PluginConfig) GetCategories() []string
- func (x *PluginConfig) GetConfig() map[string]string
- func (x *PluginConfig) GetDescription() string
- func (x *PluginConfig) GetHooks() []string
- func (x *PluginConfig) GetId() *PluginID
- func (x *PluginConfig) GetLicense() string
- func (x *PluginConfig) GetProjectUrl() string
- func (x *PluginConfig) GetRequires() map[string]string
- func (x *PluginConfig) GetTags() []string
- func (*PluginConfig) ProtoMessage()
- func (x *PluginConfig) ProtoReflect() protoreflect.Message
- func (x *PluginConfig) Reset()
- func (x *PluginConfig) String() string
- type PluginID
- func (*PluginID) Descriptor() ([]byte, []int)deprecated
- func (x *PluginID) GetChecksum() string
- func (x *PluginID) GetName() string
- func (x *PluginID) GetRemoteUrl() string
- func (x *PluginID) GetVersion() string
- func (*PluginID) ProtoMessage()
- func (x *PluginID) ProtoReflect() protoreflect.Message
- func (x *PluginID) Reset()
- func (x *PluginID) String() string
- type UnimplementedGatewayDPluginServiceServer
- func (UnimplementedGatewayDPluginServiceServer) GetPluginConfig(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnBooted(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnBooting(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnClosed(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnClosing(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnConfigLoaded(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnEgressTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnIngressTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnNewClient(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnNewLogger(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnNewPool(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnNewProxy(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnNewServer(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnOpened(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnOpening(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnRun(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnShutdown(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnSignal(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnTick(context.Context, *structpb.Struct) (*structpb.Struct, error)
- func (UnimplementedGatewayDPluginServiceServer) OnTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error)
- type UnsafeGatewayDPluginServiceServer
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetMajor() uint64
- func (x *Version) GetMetadata() string
- func (x *Version) GetMinor() uint64
- func (x *Version) GetOriginal() string
- func (x *Version) GetPatch() uint64
- func (x *Version) GetPre() string
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
Constants ¶
This section is empty.
Variables ¶
var File_plugin_v1_plugin_proto protoreflect.FileDescriptor
var GatewayDPluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.v1.GatewayDPluginService", HandlerType: (*GatewayDPluginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPluginConfig", Handler: _GatewayDPluginService_GetPluginConfig_Handler, }, { MethodName: "OnConfigLoaded", Handler: _GatewayDPluginService_OnConfigLoaded_Handler, }, { MethodName: "OnNewLogger", Handler: _GatewayDPluginService_OnNewLogger_Handler, }, { MethodName: "OnNewPool", Handler: _GatewayDPluginService_OnNewPool_Handler, }, { MethodName: "OnNewProxy", Handler: _GatewayDPluginService_OnNewProxy_Handler, }, { MethodName: "OnNewServer", Handler: _GatewayDPluginService_OnNewServer_Handler, }, { MethodName: "OnSignal", Handler: _GatewayDPluginService_OnSignal_Handler, }, { MethodName: "OnRun", Handler: _GatewayDPluginService_OnRun_Handler, }, { MethodName: "OnBooting", Handler: _GatewayDPluginService_OnBooting_Handler, }, { MethodName: "OnBooted", Handler: _GatewayDPluginService_OnBooted_Handler, }, { MethodName: "OnOpening", Handler: _GatewayDPluginService_OnOpening_Handler, }, { MethodName: "OnOpened", Handler: _GatewayDPluginService_OnOpened_Handler, }, { MethodName: "OnClosing", Handler: _GatewayDPluginService_OnClosing_Handler, }, { MethodName: "OnClosed", Handler: _GatewayDPluginService_OnClosed_Handler, }, { MethodName: "OnTraffic", Handler: _GatewayDPluginService_OnTraffic_Handler, }, { MethodName: "OnIngressTraffic", Handler: _GatewayDPluginService_OnIngressTraffic_Handler, }, { MethodName: "OnEgressTraffic", Handler: _GatewayDPluginService_OnEgressTraffic_Handler, }, { MethodName: "OnShutdown", Handler: _GatewayDPluginService_OnShutdown_Handler, }, { MethodName: "OnTick", Handler: _GatewayDPluginService_OnTick_Handler, }, { MethodName: "OnNewClient", Handler: _GatewayDPluginService_OnNewClient_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin/v1/plugin.proto", }
GatewayDPluginService_ServiceDesc is the grpc.ServiceDesc for GatewayDPluginService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Handshake = goplugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "GATEWAYD_PLUGIN",
MagicCookieValue: "5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872",
}
Handshake must be used by all plugins to ensure that the plugin and host are compatible.
Functions ¶
func GetPluginMap ¶
GetPluginMap returns the plugin map for the plugin.
func RegisterGatewayDPluginServiceServer ¶
func RegisterGatewayDPluginServiceServer(s grpc.ServiceRegistrar, srv GatewayDPluginServiceServer)
Types ¶
type GatewayDPluginServiceClient ¶
type GatewayDPluginServiceClient interface { // GetPluginConfig returns the plugin config upon registration GetPluginConfig(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) // OnConfigLoaded is called when the config is loaded from any config provider OnConfigLoaded(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnNewLogger(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnNewPool(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnNewProxy(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnNewServer(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnSignal(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnRun(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnBooting(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnBooted(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnOpening(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnOpened(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnClosing(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnClosed(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnTraffic(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnIngressTraffic(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnEgressTraffic(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnShutdown(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnTick(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) OnNewClient(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*structpb.Struct, error) }
GatewayDPluginServiceClient is the client API for GatewayDPluginService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGatewayDPluginServiceClient ¶
func NewGatewayDPluginServiceClient(cc grpc.ClientConnInterface) GatewayDPluginServiceClient
type GatewayDPluginServiceServer ¶
type GatewayDPluginServiceServer interface { // GetPluginConfig returns the plugin config upon registration GetPluginConfig(context.Context, *structpb.Struct) (*structpb.Struct, error) // OnConfigLoaded is called when the config is loaded from any config provider OnConfigLoaded(context.Context, *structpb.Struct) (*structpb.Struct, error) OnNewLogger(context.Context, *structpb.Struct) (*structpb.Struct, error) OnNewPool(context.Context, *structpb.Struct) (*structpb.Struct, error) OnNewProxy(context.Context, *structpb.Struct) (*structpb.Struct, error) OnNewServer(context.Context, *structpb.Struct) (*structpb.Struct, error) OnSignal(context.Context, *structpb.Struct) (*structpb.Struct, error) OnRun(context.Context, *structpb.Struct) (*structpb.Struct, error) OnBooting(context.Context, *structpb.Struct) (*structpb.Struct, error) OnBooted(context.Context, *structpb.Struct) (*structpb.Struct, error) OnOpening(context.Context, *structpb.Struct) (*structpb.Struct, error) OnOpened(context.Context, *structpb.Struct) (*structpb.Struct, error) OnClosing(context.Context, *structpb.Struct) (*structpb.Struct, error) OnClosed(context.Context, *structpb.Struct) (*structpb.Struct, error) OnTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error) OnIngressTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error) OnEgressTraffic(context.Context, *structpb.Struct) (*structpb.Struct, error) OnShutdown(context.Context, *structpb.Struct) (*structpb.Struct, error) OnTick(context.Context, *structpb.Struct) (*structpb.Struct, error) OnNewClient(context.Context, *structpb.Struct) (*structpb.Struct, error) // contains filtered or unexported methods }
GatewayDPluginServiceServer is the server API for GatewayDPluginService service. All implementations must embed UnimplementedGatewayDPluginServiceServer for forward compatibility
type Plugin ¶
type Plugin struct { goplugin.GRPCPlugin goplugin.NetRPCUnsupportedPlugin Impl struct { GatewayDPluginServiceServer } }
Plugin is the interface that all plugins must implement.
func (*Plugin) GRPCClient ¶
func (p *Plugin) GRPCClient(ctx context.Context, b *goplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient returns the plugin client.
func (*Plugin) GRPCServer ¶
GRPCServer registers the plugin with the gRPC server.
type PluginConfig ¶
type PluginConfig struct { Id *PluginID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Authors []string `protobuf:"bytes,3,rep,name=authors,proto3" json:"authors,omitempty"` License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"` ProjectUrl string `protobuf:"bytes,5,opt,name=project_url,json=projectUrl,proto3" json:"project_url,omitempty"` // internal and external config options Config map[string]string `` /* 153-byte string literal not displayed */ // hooks it attaches to Hooks []string `protobuf:"bytes,7,rep,name=hooks,proto3" json:"hooks,omitempty"` // required plugins Requires map[string]string `` /* 157-byte string literal not displayed */ Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` Categories []string `protobuf:"bytes,10,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
func (*PluginConfig) Descriptor
deprecated
func (*PluginConfig) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead.
func (*PluginConfig) GetAuthors ¶
func (x *PluginConfig) GetAuthors() []string
func (*PluginConfig) GetCategories ¶
func (x *PluginConfig) GetCategories() []string
func (*PluginConfig) GetConfig ¶
func (x *PluginConfig) GetConfig() map[string]string
func (*PluginConfig) GetDescription ¶
func (x *PluginConfig) GetDescription() string
func (*PluginConfig) GetHooks ¶
func (x *PluginConfig) GetHooks() []string
func (*PluginConfig) GetId ¶
func (x *PluginConfig) GetId() *PluginID
func (*PluginConfig) GetLicense ¶
func (x *PluginConfig) GetLicense() string
func (*PluginConfig) GetProjectUrl ¶
func (x *PluginConfig) GetProjectUrl() string
func (*PluginConfig) GetRequires ¶
func (x *PluginConfig) GetRequires() map[string]string
func (*PluginConfig) GetTags ¶
func (x *PluginConfig) GetTags() []string
func (*PluginConfig) ProtoMessage ¶
func (*PluginConfig) ProtoMessage()
func (*PluginConfig) ProtoReflect ¶
func (x *PluginConfig) ProtoReflect() protoreflect.Message
func (*PluginConfig) Reset ¶
func (x *PluginConfig) Reset()
func (*PluginConfig) String ¶
func (x *PluginConfig) String() string
type PluginID ¶
type PluginID struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` RemoteUrl string `protobuf:"bytes,3,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` // contains filtered or unexported fields }
func (*PluginID) Descriptor
deprecated
func (*PluginID) GetChecksum ¶
func (*PluginID) GetRemoteUrl ¶
func (*PluginID) GetVersion ¶
func (*PluginID) ProtoMessage ¶
func (*PluginID) ProtoMessage()
func (*PluginID) ProtoReflect ¶
func (x *PluginID) ProtoReflect() protoreflect.Message
type UnimplementedGatewayDPluginServiceServer ¶
type UnimplementedGatewayDPluginServiceServer struct { }
UnimplementedGatewayDPluginServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGatewayDPluginServiceServer) GetPluginConfig ¶
func (UnimplementedGatewayDPluginServiceServer) OnConfigLoaded ¶
func (UnimplementedGatewayDPluginServiceServer) OnEgressTraffic ¶
func (UnimplementedGatewayDPluginServiceServer) OnIngressTraffic ¶
func (UnimplementedGatewayDPluginServiceServer) OnNewClient ¶
func (UnimplementedGatewayDPluginServiceServer) OnNewLogger ¶
func (UnimplementedGatewayDPluginServiceServer) OnNewProxy ¶
func (UnimplementedGatewayDPluginServiceServer) OnNewServer ¶
func (UnimplementedGatewayDPluginServiceServer) OnShutdown ¶
type UnsafeGatewayDPluginServiceServer ¶
type UnsafeGatewayDPluginServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGatewayDPluginServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayDPluginServiceServer will result in compilation errors.
type Version ¶
type Version struct { Major uint64 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` Minor uint64 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` Patch uint64 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` Pre string `protobuf:"bytes,4,opt,name=pre,proto3" json:"pre,omitempty"` Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` Original string `protobuf:"bytes,6,opt,name=original,proto3" json:"original,omitempty"` // contains filtered or unexported fields }
func (*Version) Descriptor
deprecated
func (*Version) GetMetadata ¶
func (*Version) GetOriginal ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message