Documentation
¶
Index ¶
- func BuildProtocol(opt *ProtocolOption) caller.Builder
- type GoPlugin
- type Option
- func WithCustomConfigChecker(adapters ...discover.Checker) Option
- func WithCustomConfigParser(parserAdapter discover.Parser, sourceAdapter discover.SourceReader) Option
- func WithCustomIdentityChecker(adapter host.IdentityChecker) Option
- func WithCustomProcess(runner process.Runner, processes process.ProcessesBuilder) Option
- type ProtocolOption
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProtocol ¶
func BuildProtocol(opt *ProtocolOption) caller.Builder
BuildProtocol a helper to check and also generate a default protocol should be used like a REST or GRPC
Types ¶
type GoPlugin ¶
type GoPlugin struct {
// contains filtered or unexported fields
}
GoPlugin .
func New ¶
New used to create new instance of GoPlugin, you can provide customization here by giving goplugin.Option
func (*GoPlugin) Build ¶
Build used to compile current host instance into consumed state of host.Builder
func (*GoPlugin) GetProcessInstance ¶
GetProcessInstance .
type Option ¶
type Option func(*GoPlugin)
Option used to customize default objects
func WithCustomConfigChecker ¶
WithCustomConfigChecker used to customize config checker, the parameter must be implement discover.Checker
func WithCustomConfigParser ¶
func WithCustomConfigParser(parserAdapter discover.Parser, sourceAdapter discover.SourceReader) Option
WithCustomConfigParser used to customize config reader & parser, given adapters must be implement discover.Parser and discover.SourceReader interfaces
func WithCustomIdentityChecker ¶
func WithCustomIdentityChecker(adapter host.IdentityChecker) Option
WithCustomIdentityChecker used to customize plugin's identity checker, given adapter must implement host.IdentityChecker
func WithCustomProcess ¶
func WithCustomProcess(runner process.Runner, processes process.ProcessesBuilder) Option
WithCustomProcess used to customize process runner and process data builder (including registry)
type ProtocolOption ¶
type ProtocolOption struct { RestAddr string RestTimeout int GrpcClient driver.MakeClient }
ProtocolOption used to configure rest or grpc options You have to choose between rest or grpc, if your plugin using rest, than ignore grpc option, and vice versa, but you can't ignore them both