plugin

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginConfig added in v0.4.0

type PluginConfig struct {
	// Binary is the path to the plugin binary
	Binary string `yaml:"binary" json:"binary"`
	// Config holds the plugin-specific configuration key-value pairs
	Config map[string]string `yaml:"config" json:"config"`
}

PluginConfig represents a named plugin configuration

type PluginConfigs added in v0.4.0

type PluginConfigs struct {
	Plugins map[string]PluginConfig `yaml:"plugins" json:"plugins"`
}

PluginConfigs holds all configured plugins by name

func NewPluginConfigs added in v0.4.0

func NewPluginConfigs() *PluginConfigs

NewPluginConfigs creates an empty plugin configuration

func (*PluginConfigs) Get added in v0.4.0

func (c *PluginConfigs) Get(name string) *PluginConfig

Get returns the plugin configuration for the given name, or nil if not found

func (*PluginConfigs) Names added in v0.4.0

func (c *PluginConfigs) Names() []string

Names returns all configured plugin names

func (*PluginConfigs) Remove added in v0.4.0

func (c *PluginConfigs) Remove(name string)

Remove deletes a plugin configuration

func (*PluginConfigs) Set added in v0.4.0

func (c *PluginConfigs) Set(name string, cfg PluginConfig)

Set adds or updates a plugin configuration

type PushArgs added in v0.4.0

type PushArgs struct {
	TaskID string
	Status planning.TaskStatus
}

type SyncArgs

type SyncArgs struct {
	Plan  *planning.Plan
	State *planning.ExecutionState
}

RPC Client/Server wrappers

type SyncResult

type SyncResult struct {
	StatusUpdates map[string]planning.TaskStatus  `json:"status_updates"`
	LinkUpdates   map[string]planning.ExternalRef `json:"link_updates"`
	Errors        []string                        `json:"errors"`
}

SyncResult captures the outcome of a sync operation

type Syncer

type Syncer interface {
	// Init ensures the plugin can connect (auth check)
	Init(config map[string]string) error

	// Sync performs the bi-directional synchronization
	Sync(plan *planning.Plan, state *planning.ExecutionState) (*SyncResult, error)

	// Push sends a status update for a specific task to the external system
	Push(taskID string, status planning.TaskStatus) error
}

Syncer is the interface that plugins must implement.

type SyncerPlugin

type SyncerPlugin struct {
	Impl Syncer
}

SyncerPlugin is the implementation of plugin.Plugin so we can serve/consume this.

func (*SyncerPlugin) Client

func (p *SyncerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*SyncerPlugin) Server

func (p *SyncerPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type SyncerRPCClient

type SyncerRPCClient struct{ Client *rpc.Client }

func (*SyncerRPCClient) Init

func (g *SyncerRPCClient) Init(config map[string]string) error

func (*SyncerRPCClient) Push added in v0.4.0

func (g *SyncerRPCClient) Push(taskID string, status planning.TaskStatus) error

func (*SyncerRPCClient) Sync

type SyncerRPCServer

type SyncerRPCServer struct{ Impl Syncer }

func (*SyncerRPCServer) Init

func (s *SyncerRPCServer) Init(config map[string]string, resp *interface{}) error

func (*SyncerRPCServer) Push added in v0.4.0

func (s *SyncerRPCServer) Push(args *PushArgs, resp *interface{}) error

func (*SyncerRPCServer) Sync

func (s *SyncerRPCServer) Sync(args *SyncArgs, resp *SyncResult) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL