casviewer

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(ctx context.Context, instance string) (*client.Client, error)

GetClient returns a Client by loading it from cache or creating a new one.

func InstallHandlers

func InstallHandlers(r *router.Router, cc *ClientCache, appVersion string)

InstallHandlers install CAS Viewer handlers to the router.

Types

type ClientCache

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

ClientCache caches CAS clients, one per an instance.

func NewClientCache

func NewClientCache(ctx context.Context) *ClientCache

NewClientCache initializes ClientCache.

The given context will be used to create gRPC clients and their per-RPC credentials.

func (*ClientCache) Clear

func (cc *ClientCache) Clear()

Clear closes Clients gracefully, and removes them from cache.

func (*ClientCache) Get

func (cc *ClientCache) Get(instance string) (*client.Client, error)

Get returns a Client by loading it from cache or creating a new one.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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