tracts_api

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TractsImpl

type TractsImpl struct {
	pb.UnimplementedTractsAPIServer
	// contains filtered or unexported fields
}

TractsImpl implements pb.TractsAPIServer. RunTract fires the engine as `go s.tractSvc.StartRun(s.baseCtx, ...)` — baseCtx is the server-lifecycle context (set at construction, see internal/app/custom.go), not the per-request context, which is cancelled the moment the RPC returns.

func New

func New(baseCtx context.Context, tractSvc service.TractService) *TractsImpl

func (*TractsImpl) CreateTract

func (*TractsImpl) CreateTrigger

func (t *TractsImpl) CreateTrigger(
	ctx context.Context,
	req *pb.CreateTrigger_Request,
) (*pb.CreateTrigger_Response, error)

func (*TractsImpl) DeleteTract

func (*TractsImpl) DeleteTrigger

func (t *TractsImpl) DeleteTrigger(
	ctx context.Context,
	req *pb.DeleteTrigger_Request,
) (*pb.DeleteTrigger_Response, error)

func (*TractsImpl) Gateway

func (t *TractsImpl) Gateway(ctx context.Context, endpoint string, opts ...grpc.DialOption) (string, http.Handler)

func (*TractsImpl) GetRun

func (*TractsImpl) GetTract

func (*TractsImpl) GetTractTemplate

func (*TractsImpl) InstantiateTractTemplate

func (*TractsImpl) LinkTrigger

func (*TractsImpl) ListRuns

func (*TractsImpl) ListTractTemplates

func (*TractsImpl) ListTractTools

func (*TractsImpl) ListTracts

ListTracts assembles each card's linked-trigger summaries and last-run badge from the per-tract link/run listings service.TractService already exposes — no new aggregation method needed on the service.

func (*TractsImpl) ListTriggerSources

func (*TractsImpl) ListTriggers

func (*TractsImpl) PublishTractTemplate

func (*TractsImpl) Register

func (t *TractsImpl) Register(srv grpc.ServiceRegistrar)

func (*TractsImpl) RetryRun

RetryRun fires a new run that replays runUuid's own trigger_uuid/trigger_payload/started_by verbatim — no new Trigger row is ever created, so the original and the retried run end up pointing at the same trigger (or both uuid.Nil, for a retried manual run). Same fire-and- forget shape as RunTract: the run's outcome is visible via ListRuns/GetRun.

func (*TractsImpl) RotateTriggerToken

func (*TractsImpl) RunTract

RunTract fires a manual run and returns immediately — the same fire-and-forget shape as the tract webhook: the run's outcome is visible via ListRuns/GetRun. The engine is spawned against t.baseCtx (the server-lifecycle context), not ctx, which is cancelled the moment this RPC returns.

func (*TractsImpl) SetTractEnabled

func (*TractsImpl) SetTriggerEnabled

func (*TractsImpl) UnlinkTrigger

func (t *TractsImpl) UnlinkTrigger(
	ctx context.Context,
	req *pb.UnlinkTrigger_Request,
) (*pb.UnlinkTrigger_Response, error)

func (*TractsImpl) UnpublishTractTemplate

func (*TractsImpl) UpdateTract

func (*TractsImpl) WatchRun

func (t *TractsImpl) WatchRun(req *pb.WatchRun_Request, stream pb.TractsAPI_WatchRunServer) error

WatchRun streams periodic snapshots of a run's status and steps until the run reaches a terminal state (done/failed) or the client disconnects. It is a thin polling wrapper around GetRun — no pubsub/event hook exists in the engine, and this is a transport-layer concern only.

Jump to

Keyboard shortcuts

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