plugin

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package plugin provides plugin communication infrastructure.

Index

Constants

This section is empty.

Variables

View Source
var HandshakeConfig = goplugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "ROADY_PLUGIN",
	MagicCookieValue: "roady",
}
View Source
var PluginMap = map[string]goplugin.Plugin{
	"syncer": &domainPlugin.SyncerPlugin{},
}

Functions

This section is empty.

Types

type GRPCClient added in v0.4.0

type GRPCClient struct {
	// contains filtered or unexported fields
}

GRPCClient is a client that implements the Syncer interface over gRPC.

func NewGRPCClient added in v0.4.0

func NewGRPCClient(conn *grpc.ClientConn) *GRPCClient

NewGRPCClient creates a new gRPC client.

func (*GRPCClient) Init added in v0.4.0

func (c *GRPCClient) Init(config map[string]string) error

Init implements Syncer.Init over gRPC.

func (*GRPCClient) Push added in v0.4.0

func (c *GRPCClient) Push(taskID string, status planning.TaskStatus) error

Push implements Syncer.Push over gRPC.

func (*GRPCClient) Sync added in v0.4.0

Sync implements Syncer.Sync over gRPC.

type GRPCServer added in v0.4.0

type GRPCServer struct {
	pb.UnimplementedSyncerServer
	Impl domainPlugin.Syncer
}

GRPCServer wraps a Syncer implementation as a gRPC server.

func (*GRPCServer) Init added in v0.4.0

func (s *GRPCServer) Init(ctx context.Context, req *pb.InitRequest) (*pb.InitResponse, error)

Init implements the gRPC Init method.

func (*GRPCServer) Push added in v0.4.0

func (s *GRPCServer) Push(ctx context.Context, req *pb.PushRequest) (*pb.PushResponse, error)

Push implements the gRPC Push method.

func (*GRPCServer) Subscribe added in v0.4.0

func (s *GRPCServer) Subscribe(req *pb.SubscribeRequest, stream pb.Syncer_SubscribeServer) error

Subscribe implements the gRPC Subscribe method for streaming events.

func (*GRPCServer) Sync added in v0.4.0

func (s *GRPCServer) Sync(ctx context.Context, req *pb.SyncRequest) (*pb.SyncResponse, error)

Sync implements the gRPC Sync method.

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader() *Loader

func (*Loader) Cleanup

func (l *Loader) Cleanup()

func (*Loader) Load

func (l *Loader) Load(path string) (domainPlugin.Syncer, error)

Jump to

Keyboard shortcuts

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