Documentation ¶
Index ¶
- func CapsuleStep[T any](_ T, req pipeline.CapsuleRequest) (string, any, error)
- func GetNew(group, kind, name string, req pipeline.CapsuleRequest) (client.Object, error)
- func LoadYAMLConfig(data []byte, out any) error
- func ParseTemplatedConfig[T any](data []byte, req pipeline.CapsuleRequest, steps ...ParseStep[T]) (T, error)
- func StartPlugin(name string, rigPlugin Server)
- type ExternalPlugin
- type GRPCServer
- type Info
- type InitializeRequest
- type Manager
- type ManagerOption
- type Matcher
- type ParseStep
- type Plugin
- type Server
- type Step
- type ThirdPartyConfig
- type ThirdPartyPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapsuleStep ¶
func LoadYAMLConfig ¶
func ParseTemplatedConfig ¶
func ParseTemplatedConfig[T any](data []byte, req pipeline.CapsuleRequest, steps ...ParseStep[T]) (T, error)
Using this, we parse the config at every execution of the plugin. If we get performance issues due to that we can try and optimize that.
func StartPlugin ¶
Types ¶
type ExternalPlugin ¶
type ExternalPlugin struct {
// contains filtered or unexported fields
}
func (*ExternalPlugin) Run ¶
func (p *ExternalPlugin) Run(ctx context.Context, req pipeline.CapsuleRequest) error
func (*ExternalPlugin) Stop ¶
func (p *ExternalPlugin) Stop(context.Context)
type GRPCServer ¶
type GRPCServer struct { apiplugin.UnimplementedPluginServiceServer Impl Server // contains filtered or unexported fields }
func (*GRPCServer) Initialize ¶
func (m *GRPCServer) Initialize( _ context.Context, req *apiplugin.InitializeRequest, ) (*apiplugin.InitializeResponse, error)
func (*GRPCServer) RunCapsule ¶
func (m *GRPCServer) RunCapsule( ctx context.Context, req *apiplugin.RunCapsuleRequest, ) (*apiplugin.RunCapsuleResponse, error)
type InitializeRequest ¶ added in v1.7.2
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(opts ...ManagerOption) (*Manager, error)
func (*Manager) GetPlugins ¶
type ManagerOption ¶ added in v1.8.0
type ManagerOption func(m *Manager)
func SetBuiltinBinaryPathOption ¶ added in v1.8.0
func SetBuiltinBinaryPathOption(path string) ManagerOption
type Server ¶
type Server interface { Run(ctx context.Context, req pipeline.CapsuleRequest, logger hclog.Logger) error Initialize(req InitializeRequest) error }
type ThirdPartyConfig ¶ added in v1.8.0
type ThirdPartyConfig struct {
Plugins []ThirdPartyPlugin `json:"plugins"`
}
type ThirdPartyPlugin ¶ added in v1.8.0
type ThirdPartyPlugin struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.