jsonpb

package
v0.0.0-...-4a75788 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles constructing and dialing a gRPC service

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient creates a client with a Stub

func (*Client) Call

func (c *Client) Call(ctx context.Context, service, rpc string, rawMsg []byte) ([]byte, error)

Call takes in a context, service, RPC, and message as JSON string to convert to protobuf and send across the wire.

type Config

type Config struct {
	Address      string
	DialOptions  []grpc.DialOption
	ImportPaths  []string
	ServicePaths []string
}

Config handles everything necessary to construct a Client

Jump to

Keyboard shortcuts

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