Documentation
¶
Index ¶
- type FieldSyncer
- type PluginConfig
- type PluginConfigs
- type PushArgs
- type SyncArgs
- type SyncResult
- type Syncer
- type SyncerPlugin
- type SyncerRPCClient
- func (g *SyncerRPCClient) Init(config map[string]string) error
- func (g *SyncerRPCClient) Push(taskID string, status planning.TaskStatus) error
- func (g *SyncerRPCClient) PushFields(taskID string, fields TaskFields) error
- func (g *SyncerRPCClient) Sync(plan *planning.Plan, state *planning.ExecutionState) (*SyncResult, error)
- type SyncerRPCServer
- type TaskFields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldSyncer ¶ added in v0.14.0
type FieldSyncer interface {
Syncer
// PushFields sends status and attributes together. Implementations must
// treat a zero-valued field as "not specified" and leave it alone.
PushFields(taskID string, fields TaskFields) error
}
FieldSyncer is an optional extension of Syncer. A plugin that implements it receives task attributes as well as status; one that does not keeps working unchanged through Push, so adding this broke no existing plugin.
Not every tracker has somewhere sensible to put every field — Trello has no native priority — so implementing this is a per-provider choice.
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
// Priority is additive: net/rpc ignores fields a peer does not know, so
// an older plugin binary simply never sees it.
Priority planning.TaskPriority
}
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) PushFields ¶ added in v0.14.0
func (g *SyncerRPCClient) PushFields(taskID string, fields TaskFields) error
PushFields lets the host send attributes without knowing whether the plugin on the other end supports them; the server side decides.
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
type TaskFields ¶ added in v0.14.0
type TaskFields struct {
Status planning.TaskStatus
Priority planning.TaskPriority
}
TaskFields carries the task attributes Roady pushes outward alongside status.
Priority only travels outward. It originates in the spec (Requirement.Priority), flows into the plan, and is rebuilt from the spec every time a plan is generated — PlanReconciler replaces each task with the proposed structure — so a priority written inward from a tracker would be silently discarded on the next `roady plan generate`. Rather than offer a field that quietly loses data, the direction is one-way by design.
Estimate and assignee are deliberately absent. Roady's estimate is a free string ("4h") and its owner is a free string, while trackers use story points and user IDs; mapping either without a per-provider identity resolution would overwrite real data with a guess.