client

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialOptionsFromConfig

func DialOptionsFromConfig(cfg *flow.Config) ([]grpc.DialOption, error)

DialOptionsFromConfig returns dial options configured from a Carbon config

Types

type Client

type Client struct {
	accountsapi.AccountsClient
	infoapi.InfoClient
	workflowsapi.WorkflowsClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *flow.Config, clientOpts ...ClientOpt) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

type ClientConfig

type ClientConfig struct {
	Username     string
	Namespace    string
	Token        string
	APIToken     string
	ServiceToken string
	Insecure     bool
}

type ClientOpt

type ClientOpt func(c *ClientConfig)

func WithAPIToken

func WithAPIToken(token string) ClientOpt

WithAPIToken is an opt that sets the client user api token

func WithInsecure added in v0.2.0

func WithInsecure() ClientOpt

WithInsecure is an opt to set insecure for GRPC

func WithNamespace

func WithNamespace(ns string) ClientOpt

WithNamespace is an opt that sets the client namespace

func WithServiceToken

func WithServiceToken(token string) ClientOpt

WithServiceToken is an opt that sets the client service token

func WithToken

func WithToken(token string) ClientOpt

WithToken is an opt that sets the client token

func WithUsername

func WithUsername(username string) ClientOpt

WithUsername is an opt that sets the client username

Jump to

Keyboard shortcuts

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