internal

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnPool

type ConnPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConnPool

func NewConnPool(logger logrus.FieldLogger, dialer contextDialer) *ConnPool

func (*ConnPool) GetClientConn

func (c *ConnPool) GetClientConn(ctx context.Context, destination string, dialOptions ...grpc.DialOption) (*grpc.ClientConn, error)

type Message

type Message struct {
	MessageOrigin MessageOrigin `json:"message_origin,omitempty"`
	RawMessage    []byte        `json:"raw_message"`
	Message       interface{}   `json:"message,omitempty"`
	Timestamp     time.Time     `json:"timestamp"`
}

type MessageOrigin

type MessageOrigin string
const (
	ClientMessage MessageOrigin = "client"
	ServerMessage MessageOrigin = "server"
)

type RPC

type RPC struct {
	Service              string      `json:"service"`
	Method               string      `json:"method"`
	Messages             []*Message  `json:"messages"`
	Status               *Status     `json:"error,omitempty"`
	Metadata             metadata.MD `json:"metadata"`
	MetadataRespHeaders  metadata.MD `json:"metadata_response_headers"`
	MetadataRespTrailers metadata.MD `json:"metadata_response_trailers"`
}

func (RPC) StreamName

func (r RPC) StreamName() string

type Status

type Status struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

Directories

Path Synopsis
Copied from google.golang.org/grpc/proxy.go with modifications to allow testing
Copied from google.golang.org/grpc/proxy.go with modifications to allow testing

Jump to

Keyboard shortcuts

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