grpc

package
v0.0.0-...-e65cc6c Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: Apache-2.0 Imports: 25 Imported by: 12

Documentation

Index

Constants

View Source
const (
	InvocationError       = `WF_INVOCATION_ERROR`
	ProcInvocationError   = `WF_PROC_INVOCATION_ERROR`
	RemoteInvocationError = `WF_REMOTE_INVOCATION_ERROR`
)

Variables

This section is empty.

Functions

func FromDataPB

func FromDataPB(c px.Context, d *datapb.Data) px.Value

func Load

func Load(cmd *exec.Cmd, logger hclog.Logger) (serviceapi.Service, error)

Load ...

func NewHclogLogger

func NewHclogLogger(log hclog.Logger) px.Logger

func Serve

func Serve(c px.Context, s serviceapi.Service)

Serve the supplied Server as a go-plugin

func ToDataPB

func ToDataPB(c px.Context, v px.Value) (data *datapb.Data)

Types

type Client

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

func (*Client) Identifier

func (c *Client) Identifier(ctx px.Context) px.TypedName

func (*Client) Invoke

func (c *Client) Invoke(ctx px.Context, identifier, name string, arguments ...px.Value) px.Value

func (*Client) Metadata

func (c *Client) Metadata(ctx px.Context) (typeSet px.TypeSet, definitions []serviceapi.Definition)

func (*Client) State

func (c *Client) State(ctx px.Context, identifier string, parameters px.OrderedMap) px.PuppetObject

type PluginClient

type PluginClient struct {
	plugin.NetRPCUnsupportedPlugin
}

func (*PluginClient) GRPCClient

func (a *PluginClient) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, clientConn *grpc.ClientConn) (interface{}, error)

func (*PluginClient) GRPCServer

func (a *PluginClient) GRPCServer(*plugin.GRPCBroker, *grpc.Server) error

type Server

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

func (*Server) Client

func (s *Server) Client(*plugin.MuxBroker, *rpc.Client) (interface{}, error)

func (*Server) Do

func (s *Server) Do(doer func(c px.Context)) (publicErr *datapb.Data, err error)

func (*Server) GRPCClient

func (s *Server) GRPCClient(context.Context, *plugin.GRPCBroker, *grpc.ClientConn) (interface{}, error)

func (*Server) GRPCServer

func (s *Server) GRPCServer(broker *plugin.GRPCBroker, impl *grpc.Server) error

func (*Server) Identity

func (s *Server) Identity(context.Context, *servicepb.EmptyRequest) (result *datapb.Data, err error)

func (*Server) Invoke

func (s *Server) Invoke(_ context.Context, r *servicepb.InvokeRequest) (result *datapb.Data, err error)

func (*Server) Metadata

func (s *Server) Metadata(_ context.Context, r *servicepb.EmptyRequest) (result *servicepb.MetadataResponse, err error)

func (*Server) Server

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

func (*Server) State

func (s *Server) State(_ context.Context, r *servicepb.StateRequest) (result *datapb.Data, err error)

Jump to

Keyboard shortcuts

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