client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSDKClient

func GetSDKClient(c *cli.Context) (sdkclient.Client, error)

GetSDKClient is a helper function to get an SDK client from a cli.Context

func Init added in v0.6.0

func Init(c *cli.Context)

func NewRemotePayloadCodec added in v0.11.0

func NewRemotePayloadCodec(options RemotePayloadCodecOptions) converter.PayloadCodec

NewRemotePayloadCodec creates a PayloadCodec using the remote endpoint configured by RemotePayloadCodecOptions.

func SetFactory added in v0.9.0

func SetFactory(app *cli.App, factory ClientFactory)

SetFactory sets the app's metadata to include a ClientFactory

Types

type ClientFactory

type ClientFactory interface {
	FrontendClient(c *cli.Context) workflowservice.WorkflowServiceClient
	OperatorClient(c *cli.Context) operatorservice.OperatorServiceClient
	SDKClient(c *cli.Context, namespace string) sdkclient.Client
	HealthClient(c *cli.Context) healthpb.HealthClient
}

ClientFactory is used to construct rpc clients

func Factory added in v0.9.0

func Factory(app *cli.App) ClientFactory

Factory returns a ClientFactory from the app's metadata

func NewClientFactory

func NewClientFactory() ClientFactory

NewClientFactory creates a new ClientFactory

type HttpGetter

type HttpGetter interface {
	Get(url string) (resp *http.Response, err error)
}

HttpGetter defines http.Client.Get(...) as an interface so we can mock it

type RemotePayloadCodecOptions added in v0.11.0

type RemotePayloadCodecOptions struct {
	Endpoint      string
	ModifyRequest func(*http.Request) error
	Client        http.Client
}

RemotePayloadCodecOptions are options for RemotePayloadCodec. Client is optional.

type SdkLogger

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

func NewSdkLogger

func NewSdkLogger(logger log.Logger) *SdkLogger

func (*SdkLogger) Debug

func (l *SdkLogger) Debug(msg string, keyvals ...interface{})

func (*SdkLogger) Error

func (l *SdkLogger) Error(msg string, keyvals ...interface{})

func (*SdkLogger) Info

func (l *SdkLogger) Info(msg string, keyvals ...interface{})

func (*SdkLogger) Warn

func (l *SdkLogger) Warn(msg string, keyvals ...interface{})

func (*SdkLogger) With

func (l *SdkLogger) With(keyvals ...interface{}) sdklog.Logger

Jump to

Keyboard shortcuts

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