proxy

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 25 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFailureVisitorInterceptor

func NewFailureVisitorInterceptor(options FailureVisitorInterceptorOptions) (grpc.UnaryClientInterceptor, error)

NewFailureVisitorInterceptor creates a new gRPC interceptor for workflowservice messages.

Note: Failure converters should come before payload codec converts, to allow the payloads generated by the failure convert to be intercepted by the payload codec converters.

func NewPayloadVisitorInterceptor

func NewPayloadVisitorInterceptor(options PayloadVisitorInterceptorOptions) (grpc.UnaryClientInterceptor, error)

NewPayloadVisitorInterceptor creates a new gRPC interceptor for workflowservice messages.

Note: Failure converters should come before payload codec converts, to allow the payloads generated by the failure convert to be intercepted by the payload codec converters.

func NewWorkflowServiceProxyServer

func NewWorkflowServiceProxyServer(options WorkflowServiceProxyOptions) (workflowservice.WorkflowServiceServer, error)

NewWorkflowServiceProxyServer creates a WorkflowServiceServer suitable for registering with a gRPC Server. Requests will be forwarded to the passed in WorkflowService Client. gRPC interceptors can be added on the Server or Client to adjust requests and responses.

func VisitFailures

func VisitFailures(ctx context.Context, msg proto.Message, options VisitFailuresOptions) error

VisitFailures calls the options.Visitor function for every Failure proto within msg.

func VisitPayloads

func VisitPayloads(ctx context.Context, msg proto.Message, options VisitPayloadsOptions) error

VisitPayloads calls the options.Visitor function for every Payload proto within msg.

Note: Directly visiting *common.Payload is not supported. Payloads must be passed through a parent proto.

Types

type FailureVisitorInterceptorOptions

type FailureVisitorInterceptorOptions struct {
	// Visit options for outbound messages
	Outbound *VisitFailuresOptions
	// Visit options for inbound messages
	Inbound *VisitFailuresOptions
}

FailureVisitorInterceptorOptions configures outbound/inbound interception of Failures within msgs.

type PayloadVisitorInterceptorOptions

type PayloadVisitorInterceptorOptions struct {
	// Visit options for outbound messages
	Outbound *VisitPayloadsOptions
	// Visit options for inbound messages
	Inbound *VisitPayloadsOptions
}

PayloadVisitorInterceptorOptions configures outbound/inbound interception of Payloads within msgs.

type VisitFailuresContext

type VisitFailuresContext struct {
	context.Context
	// The parent message for this failure.
	Parent proto.Message
}

VisitFailuresContext provides Failure context for visitor functions.

type VisitFailuresOptions

type VisitFailuresOptions struct {
	// Context is the same for every call of a visit, callers should not store it.
	// Visitor is free to mutate the passed failure struct.
	Visitor func(*VisitFailuresContext, *failure.Failure) error
	// Will be called for each Any encountered. If not set, the default is to recurse into the Any
	// object, unmarshal it, visit, and re-marshal it always (even if there are no changes).
	WellKnownAnyVisitor func(*VisitFailuresContext, *anypb.Any) error
}

VisitFailuresOptions configure visitor behaviour.

type VisitPayloadsContext

type VisitPayloadsContext struct {
	context.Context
	// The parent message for this payload.
	Parent proto.Message
	// If true, a single payload is given and a single payload must be returned.
	SinglePayloadRequired bool
}

VisitPayloadsContext provides Payload context for visitor functions.

type VisitPayloadsOptions

type VisitPayloadsOptions struct {
	// Context is the same for every call of a visit, callers should not store it. This must never
	// return an empty set of payloads.
	Visitor func(*VisitPayloadsContext, []*common.Payload) ([]*common.Payload, error)
	// Don't visit search attribute payloads.
	SkipSearchAttributes bool
	// Will be called for each Any encountered. If not set, the default is to recurse into the Any
	// object, unmarshal it, visit, and re-marshal it always (even if there are no changes).
	WellKnownAnyVisitor func(*VisitPayloadsContext, *anypb.Any) error
}

VisitPayloadsOptions configure visitor behaviour.

type WorkflowServiceProxyOptions

type WorkflowServiceProxyOptions struct {
	Client                  workflowservice.WorkflowServiceClient
	DisableHeaderForwarding bool
}

WorkflowServiceProxyOptions provides options for configuring a WorkflowServiceProxyServer. Client is a WorkflowServiceClient used to forward requests received by the server to the Temporal Frontend.

Jump to

Keyboard shortcuts

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