client

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022 Evan Hazlett

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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