resourcemanager

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager type is in charge of keeping track of all cluster resources.

func New

func New(kv kv.KV) *Manager

New creates a new resource manager given a KV storage instance.

func (*Manager) DelResource

func (m *Manager) DelResource(ctx context.Context, username, resource string) error

DelResource removes a registered resource from the manager.

func (*Manager) GetResource

func (m *Manager) GetResource(ctx context.Context, username, resource string) (*model.Resource, error)

GetResource returns a previously registered resource.

func (*Manager) GetResources

func (m *Manager) GetResources(ctx context.Context, username string) ([]model.Resource, error)

GetResources returns all user registered resources.

func (*Manager) PutResource

func (m *Manager) PutResource(ctx context.Context, res *model.Resource) error

PutResource registers or updates a resource into the manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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