Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(c 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)

InstallHandlers install CAS Viewer handlers to the router.

func NewClient

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

NewClient connects to the instance of remote execution service, and returns a client.

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.

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