Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CorePluginConfig ¶
type CorePluginConfig[ServerType any] struct { PluginID string PluginType pluginservicev1.PluginType ProtocolVersion string PluginServer ServerType }
CorePluginConfig is a struct that contains the core configuration for a plugin server.
type Server ¶
type Server[ServerType any] struct { // contains filtered or unexported fields }
Server is a plugin server.
func NewServer ¶
func NewServer[ServerType any]( corePluginConfig *CorePluginConfig[ServerType], registerPluginFunc func(s grpc.ServiceRegistrar, srv ServerType), pluginMetadata *pluginservicev1.PluginMetadata, pluginServiceClient pluginservicev1.ServiceClient, hostInfoContainer pluginutils.HostInfoContainer, opts ...ServerOption[ServerType], ) *Server[ServerType]
NewServer creates a new plugin server that is used as the base for all plugin type servers.
type ServerOption ¶
ServerOption is a function that configures a server.
func WithDebug ¶
func WithDebug[ServerType any]() ServerOption[ServerType]
WithDebug is a server option that enables debug mode.
func WithListener ¶
func WithListener[ServerType any](listener net.Listener) ServerOption[ServerType]
WithListener is a server option that sets the listener that the server should use.
func WithTCPPort ¶
func WithTCPPort[ServerType any](port int) ServerOption[ServerType]
WithTCPPort is a server option that sets the TCP port.
func WithUnixSocket ¶
func WithUnixSocket[ServerType any](path string) ServerOption[ServerType]
WithUnixSocket is a server option that sets the Unix socket path.
Click to show internal directories.
Click to hide internal directories.