plugin

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataConverterPluginType   = "DataConverter"
	HeadersProviderPluginType = "HeadersProvider"
)

Variables

View Source
var (
	PluginHandshakeConfig = plugin.HandshakeConfig{
		ProtocolVersion:  1,
		MagicCookieKey:   "TEMPORAL_CLI_PLUGIN",
		MagicCookieValue: "abb3e448baf947eba1847b10a38554db",
	}
)

Functions

func NewDataConverterPlugin

func NewDataConverterPlugin(name string) (converter.DataConverter, error)

func StopPlugins

func StopPlugins()

Types

type DataConverterPlugin

type DataConverterPlugin struct {
	Impl converter.DataConverter
}

func (DataConverterPlugin) Client

func (DataConverterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*DataConverterPlugin) Server

func (p *DataConverterPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type DataConverterRPC

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

func (*DataConverterRPC) FromPayload

func (g *DataConverterRPC) FromPayload(payload *commonpb.Payload, valuePtr interface{}) error

func (*DataConverterRPC) FromPayloads

func (g *DataConverterRPC) FromPayloads(payloads *commonpb.Payloads, valuePtr ...interface{}) error

func (*DataConverterRPC) ToPayload

func (g *DataConverterRPC) ToPayload(value interface{}) (*commonpb.Payload, error)

func (*DataConverterRPC) ToPayloads

func (g *DataConverterRPC) ToPayloads(values ...interface{}) (*commonpb.Payloads, error)

func (*DataConverterRPC) ToString

func (g *DataConverterRPC) ToString(input *commonpb.Payload) string

func (*DataConverterRPC) ToStrings

func (g *DataConverterRPC) ToStrings(input *commonpb.Payloads) []string

type DataConverterRPCServer

type DataConverterRPCServer struct {
	Impl converter.DataConverter
}

func (*DataConverterRPCServer) FromPayload

func (s *DataConverterRPCServer) FromPayload(input *commonpb.Payload, resp *interface{}) error

func (*DataConverterRPCServer) FromPayloads

func (s *DataConverterRPCServer) FromPayloads(input *commonpb.Payloads, resp *[]interface{}) error

func (*DataConverterRPCServer) ToPayload

func (s *DataConverterRPCServer) ToPayload(value interface{}, resp *commonpb.Payload) error

func (*DataConverterRPCServer) ToPayloads

func (s *DataConverterRPCServer) ToPayloads(values []interface{}, resp *commonpb.Payloads) error

func (*DataConverterRPCServer) ToString

func (s *DataConverterRPCServer) ToString(input *commonpb.Payload, resp *string) error

func (*DataConverterRPCServer) ToStrings

func (s *DataConverterRPCServer) ToStrings(input *commonpb.Payloads, resp *[]string) error

type HeadersProvider

type HeadersProvider interface {
	GetHeaders(context.Context) (map[string]string, error)
}

func NewHeadersProviderPlugin

func NewHeadersProviderPlugin(name string) (HeadersProvider, error)

type HeadersProviderPlugin

type HeadersProviderPlugin struct {
	Impl HeadersProvider
}

func (HeadersProviderPlugin) Client

func (HeadersProviderPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*HeadersProviderPlugin) Server

func (p *HeadersProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type HeadersProviderRPC

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

func (*HeadersProviderRPC) GetHeaders

func (g *HeadersProviderRPC) GetHeaders(ctx context.Context) (map[string]string, error)

type HeadersProviderRPCServer

type HeadersProviderRPCServer struct {
	Impl HeadersProvider
}

func (*HeadersProviderRPCServer) GetHeaders

func (s *HeadersProviderRPCServer) GetHeaders(sCtx PluginSafeContext, resp *map[string]string) error

type PluginSafeContext added in v1.12.0

type PluginSafeContext struct {
	Values map[string]interface{}
}

func NewPluginSafeContext added in v1.12.0

func NewPluginSafeContext(ctx context.Context) PluginSafeContext

func (*PluginSafeContext) GetContext added in v1.12.0

func (sCtx *PluginSafeContext) GetContext() context.Context

Jump to

Keyboard shortcuts

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