triggerconnect

package
v2.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TriggerServiceDeployTriggerProcedure is the fully-qualified name of the TriggerService's
	// DeployTrigger RPC.
	TriggerServiceDeployTriggerProcedure = "/flyteidl2.trigger.TriggerService/DeployTrigger"
	// TriggerServiceGetTriggerDetailsProcedure is the fully-qualified name of the TriggerService's
	// GetTriggerDetails RPC.
	TriggerServiceGetTriggerDetailsProcedure = "/flyteidl2.trigger.TriggerService/GetTriggerDetails"
	// TriggerServiceGetTriggerRevisionDetailsProcedure is the fully-qualified name of the
	// TriggerService's GetTriggerRevisionDetails RPC.
	TriggerServiceGetTriggerRevisionDetailsProcedure = "/flyteidl2.trigger.TriggerService/GetTriggerRevisionDetails"
	// TriggerServiceListTriggersProcedure is the fully-qualified name of the TriggerService's
	// ListTriggers RPC.
	TriggerServiceListTriggersProcedure = "/flyteidl2.trigger.TriggerService/ListTriggers"
	// TriggerServiceGetTriggerRevisionHistoryProcedure is the fully-qualified name of the
	// TriggerService's GetTriggerRevisionHistory RPC.
	TriggerServiceGetTriggerRevisionHistoryProcedure = "/flyteidl2.trigger.TriggerService/GetTriggerRevisionHistory"
	// TriggerServiceUpdateTriggersProcedure is the fully-qualified name of the TriggerService's
	// UpdateTriggers RPC.
	TriggerServiceUpdateTriggersProcedure = "/flyteidl2.trigger.TriggerService/UpdateTriggers"
	// TriggerServiceDeleteTriggersProcedure is the fully-qualified name of the TriggerService's
	// DeleteTriggers RPC.
	TriggerServiceDeleteTriggersProcedure = "/flyteidl2.trigger.TriggerService/DeleteTriggers"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// TriggerServiceName is the fully-qualified name of the TriggerService service.
	TriggerServiceName = "flyteidl2.trigger.TriggerService"
)

Variables

This section is empty.

Functions

func NewTriggerServiceHandler

func NewTriggerServiceHandler(svc TriggerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewTriggerServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type TriggerServiceClient

type TriggerServiceClient interface {
	// Create if trigger didn't exist previously.
	// Update if it already exists.
	// Re-create(or undelete) if it was soft-deleted.
	// Client must fetch the latest trigger in order to obtain the latest `trigger.id.revision`.
	// If trigger is not found, client can set `trigger.id.revision` to 1, it is ignored and set automatically by backend.
	// If trigger is found, client should set `trigger.id.revision` to the <latest>.
	// Backend validates that version is the latest and creates a new revision of the trigger.
	// Otherwise, operation is rejected(optimistic locking) and client must re-fetch trigger again.
	DeployTrigger(context.Context, *connect.Request[trigger.DeployTriggerRequest]) (*connect.Response[trigger.DeployTriggerResponse], error)
	// Get detailed info about the latest trigger revision
	GetTriggerDetails(context.Context, *connect.Request[trigger.GetTriggerDetailsRequest]) (*connect.Response[trigger.GetTriggerDetailsResponse], error)
	// Get detailed info about a specific trigger revision
	GetTriggerRevisionDetails(context.Context, *connect.Request[trigger.GetTriggerRevisionDetailsRequest]) (*connect.Response[trigger.GetTriggerRevisionDetailsResponse], error)
	// List basic info about triggers based on various filtering and sorting rules.
	ListTriggers(context.Context, *connect.Request[trigger.ListTriggersRequest]) (*connect.Response[trigger.ListTriggersResponse], error)
	// GetTriggerRevisionHistory returns all revisions for a given trigger
	GetTriggerRevisionHistory(context.Context, *connect.Request[trigger.GetTriggerRevisionHistoryRequest]) (*connect.Response[trigger.GetTriggerRevisionHistoryResponse], error)
	// Update some trigger spec fields for multiple triggers at once
	UpdateTriggers(context.Context, *connect.Request[trigger.UpdateTriggersRequest]) (*connect.Response[trigger.UpdateTriggersResponse], error)
	// Soft-delete multiple triggers at once.
	DeleteTriggers(context.Context, *connect.Request[trigger.DeleteTriggersRequest]) (*connect.Response[trigger.DeleteTriggersResponse], error)
}

TriggerServiceClient is a client for the flyteidl2.trigger.TriggerService service.

func NewTriggerServiceClient

func NewTriggerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) TriggerServiceClient

NewTriggerServiceClient constructs a client for the flyteidl2.trigger.TriggerService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type TriggerServiceHandler

type TriggerServiceHandler interface {
	// Create if trigger didn't exist previously.
	// Update if it already exists.
	// Re-create(or undelete) if it was soft-deleted.
	// Client must fetch the latest trigger in order to obtain the latest `trigger.id.revision`.
	// If trigger is not found, client can set `trigger.id.revision` to 1, it is ignored and set automatically by backend.
	// If trigger is found, client should set `trigger.id.revision` to the <latest>.
	// Backend validates that version is the latest and creates a new revision of the trigger.
	// Otherwise, operation is rejected(optimistic locking) and client must re-fetch trigger again.
	DeployTrigger(context.Context, *connect.Request[trigger.DeployTriggerRequest]) (*connect.Response[trigger.DeployTriggerResponse], error)
	// Get detailed info about the latest trigger revision
	GetTriggerDetails(context.Context, *connect.Request[trigger.GetTriggerDetailsRequest]) (*connect.Response[trigger.GetTriggerDetailsResponse], error)
	// Get detailed info about a specific trigger revision
	GetTriggerRevisionDetails(context.Context, *connect.Request[trigger.GetTriggerRevisionDetailsRequest]) (*connect.Response[trigger.GetTriggerRevisionDetailsResponse], error)
	// List basic info about triggers based on various filtering and sorting rules.
	ListTriggers(context.Context, *connect.Request[trigger.ListTriggersRequest]) (*connect.Response[trigger.ListTriggersResponse], error)
	// GetTriggerRevisionHistory returns all revisions for a given trigger
	GetTriggerRevisionHistory(context.Context, *connect.Request[trigger.GetTriggerRevisionHistoryRequest]) (*connect.Response[trigger.GetTriggerRevisionHistoryResponse], error)
	// Update some trigger spec fields for multiple triggers at once
	UpdateTriggers(context.Context, *connect.Request[trigger.UpdateTriggersRequest]) (*connect.Response[trigger.UpdateTriggersResponse], error)
	// Soft-delete multiple triggers at once.
	DeleteTriggers(context.Context, *connect.Request[trigger.DeleteTriggersRequest]) (*connect.Response[trigger.DeleteTriggersResponse], error)
}

TriggerServiceHandler is an implementation of the flyteidl2.trigger.TriggerService service.

type UnimplementedTriggerServiceHandler

type UnimplementedTriggerServiceHandler struct{}

UnimplementedTriggerServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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