client

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGRPCConnection

func GetGRPCConnection(serverHost string) (conn *grpc.ClientConn, err error)

GetGRPCConnection returns a new grpc connection

Types

type Client

type Client struct {
	Config *Config
	RPC    rpc.GRPCClient
}

Client contains all necessary information to connect to the server

func NewClient

func NewClient(cfg *Config, conn *grpc.ClientConn) *Client

NewClient returns a new instance of the client

func (*Client) GetVersion

func (client *Client) GetVersion(ctx context.Context) (*rpc.Version, error)

GetVersion returns the server version

func (*Client) ServerStream

func (client *Client) ServerStream(ctx context.Context, opts ...grpc.CallOption) error

ServerStream starts a stream from the server

type Config

type Config struct {
	ServerHost string
	Stdout     io.Writer
	Stderr     io.Writer
}

Config contains all configuration for the client

Jump to

Keyboard shortcuts

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