client

package
v0.0.0-...-441d1d1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error has an IsNotFound function that also returns true

func NewGRPCClient

func NewGRPCClient(opts ClientOpts) (conn *grpc.ClientConn, err error)

NewGRPCClient that connects to the configurator server

Types

type Client

type Client struct {
	Opts   ClientOpts
	Client request.PlainSQLClient
	// contains filtered or unexported fields
}

Client is a GRPC client for requests

func NewClient

func NewClient(opts ClientOpts) *Client

NewClient builds and returns a new Client that wraps a GRPC connections\

func (*Client) Close

func (c *Client) Close() error

Close connection to grpc client

func (*Client) Echo

func (c *Client) Echo(req request.Request) (resp *request.Request, err error)

Echo call to get response from server

func (*Client) Execute

func (c *Client) Execute(req request.Request) (resp *request.Results, err error)

Echo call to get response from server

func (*Client) Init

func (c *Client) Init() (err error)

Init starts dials the grpc connection

type ClientOpts

type ClientOpts struct {
	ServerHost string `` /* 128-byte string literal not displayed */
	SkipVerify bool   `env:"companysettings.skipVerify" short:"k" long:"skip-verify" description:"Skip hostname verification"`
}

ClientOpts to add to your flags or env config

Jump to

Keyboard shortcuts

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