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.
type SyncerRPCClient ¶
func (*SyncerRPCClient) Push ¶ added in v0.4.0
func (g *SyncerRPCClient) Push(taskID string, status planning.TaskStatus) error
func (*SyncerRPCClient) Sync ¶
func (g *SyncerRPCClient) Sync(plan *planning.Plan, state *planning.ExecutionState) (*SyncResult, error)
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
Click to show internal directories.
Click to hide internal directories.