plugin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 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 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)
}

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) Sync

type SyncerRPCServer

type SyncerRPCServer struct{ Impl Syncer }

func (*SyncerRPCServer) Init

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

func (*SyncerRPCServer) Sync

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

Jump to

Keyboard shortcuts

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