pilotutil

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialPilotService

func DialPilotService(ctx context.Context, host string, port int) (
	client pbpilot.PilotServiceClient,
	conn *grpc.ClientConn,
	err error,
)

func LoadPilotConfig

func LoadPilotConfig(path string) (*pbtypes.PilotConfig, error)

func MustLoadPilotConfig

func MustLoadPilotConfig(path string) *pbtypes.PilotConfig

Types

type FrameChannel

type FrameChannel struct {
	RecvMsgFunc func() ([]byte, error)
	SendMsgFunc func(data []byte) error
	CloseFunc   func() error
	// contains filtered or unexported fields
}

func DialFrontgateChannel

func DialFrontgateChannel(
	ctx context.Context, target string,
	opts ...grpc.DialOption,
) (
	ch *FrameChannel, conn *grpc.ClientConn,
	err error,
)

func NewFrameChannel

func NewFrameChannel(
	recv func() ([]byte, error), send func(data []byte) error,
	close func() error,
) *FrameChannel

func NewFrontgateChannelFromClient

func NewFrontgateChannelFromClient(ch pbpilot.PilotService_FrontgateChannelClient) *FrameChannel

func NewFrontgateChannelFromServer

func NewFrontgateChannelFromServer(ch pbpilot.PilotService_FrontgateChannelServer) *FrameChannel

func (*FrameChannel) Close

func (p *FrameChannel) Close() error

func (*FrameChannel) Read

func (p *FrameChannel) Read(data []byte) (n int, err error)

func (*FrameChannel) Write

func (p *FrameChannel) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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