client

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for the registry service.

func NewClient

func NewClient(credentialsMountDirectory string, natsURI string, component string) (*Client, error)

NewClient creates a new client for the registry service.

func (*Client) Registry

func (c *Client) Registry(option *RegistryOptions, creds *api.Credentials) error

Registry is used to register or unregister an application to the nats server

func (*Client) Shutdown

func (c *Client) Shutdown()

Shutdown unregisteres the application and shuts down the nats connection.

func (*Client) Start

func (c *Client) Start() error

Start starts the client.

type NatsCredentials

type NatsCredentials struct {
	Username         string `json:"username"`
	CredsFileContent string `json:"creds"`
}

NatsCredentials contains the credentials for the nats server.

type RegistryOptions

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

RegistryOptions is used to configure a Registry request

func Register

func Register() *RegistryOptions

Register is used to configure a Register request

func Unregister

func Unregister() *RegistryOptions

Unregister is used to configure an Unregister request

Jump to

Keyboard shortcuts

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