client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

gRPC clients

Functions

func GetConnection

func GetConnection() (*grpc.ClientConn, error)

GetConnection returns a gRPC client connection

func NewClientConn added in v0.5.0

func NewClientConn(opt *ConnOptions) (*grpc.ClientConn, error)

func Setup

func Setup() error

Setup : create a connection to server

func TinkHardwareClient

func TinkHardwareClient() (hardware.HardwareServiceClient, error)

TinkHardwareClient creates a new hardware client

func TinkWorkflowClient

func TinkWorkflowClient() (workflow.WorkflowServiceClient, error)

TinkWorkflowClient creates a new workflow client

Types

type ConnOptions added in v0.5.0

type ConnOptions struct {
	CertURL       string
	GRPCAuthority string
}

func (*ConnOptions) SetFlags added in v0.5.0

func (o *ConnOptions) SetFlags(flagSet *pflag.FlagSet)

type FullClient added in v0.5.0

type FullClient struct {
	TemplateClient template.TemplateServiceClient
	WorkflowClient workflow.WorkflowServiceClient
	HardwareClient hardware.HardwareServiceClient
	EventsClient   events.EventsServiceClient
}

FullClient aggregates all the gRPC clients available from Tinkerbell Server

func NewFullClient added in v0.5.0

func NewFullClient(conn grpc.ClientConnInterface) *FullClient

NewFullClient returns a FullClient. A structure that contains all the clients made available from tink-server. This is the function you should use instead of NewFullClientFromGlobal that will be deprecated soon

func NewFullClientFromGlobal added in v0.5.0

func NewFullClientFromGlobal() (*FullClient, error)

NewFullClientFromGlobal is a dirty hack that returns a FullClient using the global variables exposed by the client package. Globals should be avoided and we will deprecate them at some point replacing this function with NewFullClient. If you are starting a new project please use NewFullClient instead.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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