client

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Project() v1.ProjectServiceClient
	Tenant() v1.TenantServiceClient
	Close() error
}

Client defines the client API

func NewClient

func NewClient(ctx context.Context, hostname string, port int, certFile string, keyFile string, caFile string, hmacKey string, logger *zap.Logger) (Client, error)

NewClient creates a new client for the services for the given address, with the certificate and hmac.

type GRPCClient

type GRPCClient struct {
	// contains filtered or unexported fields
}

GRPCClient is a Client implementation with grpc transport.

func (GRPCClient) Close

func (c GRPCClient) Close() error

Close the underlying connection

func (GRPCClient) Project

func (c GRPCClient) Project() v1.ProjectServiceClient

Project is the root accessor for project related functions

func (GRPCClient) Tenant

func (c GRPCClient) Tenant() v1.TenantServiceClient

Tenant is the root accessor for tenant related functions

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

func (*MockClient) Close

func (c *MockClient) Close() error

func (*MockClient) Project

func (c *MockClient) Project() v1.ProjectServiceClient

func (*MockClient) Tenant

func (c *MockClient) Tenant() v1.TenantServiceClient

Jump to

Keyboard shortcuts

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