proxy

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 15 Imported by: 4

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.

func NewPayloadVisitorInterceptor

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

NewPayloadVisitorInterceptor creates a new gRPC interceptor for workflowservice messages.

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.

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
}

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
}

VisitPayloadsOptions configure visitor behaviour.

type WorkflowServiceProxyOptions

type WorkflowServiceProxyOptions struct {
	Client workflowservice.WorkflowServiceClient
}

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