client

package
v0.0.0-...-f11c6e4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 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 struct {
	Schema string
	IP     string
	Port   int
}

func (Client) NewResource

func (c Client) NewResource(resourceName string) (*ResourceType, bool)

type ResourceNodeType

type ResourceNodeType struct {
	Resource ResourceType
	Node     string
	Max      uint64
	Min      uint64
	Init     uint64
}

func (ResourceNodeType) ResourceNodeDown

func (n ResourceNodeType) ResourceNodeDown(uid string) bool

func (ResourceNodeType) ResourceNodeUp

func (n ResourceNodeType) ResourceNodeUp(diff uint64, uid string) bool

type ResourceType

type ResourceType struct {
	Client       Client
	ResourceName string
}

func (ResourceType) Alloc

func (r ResourceType) Alloc(value uint) (string, string, bool)

func (ResourceType) Allocating

func (r ResourceType) Allocating(
	value uint,
	node *string,
	uid *string,
	argWait *sync.WaitGroup,
	wait *sync.WaitGroup,
)

func (ResourceType) NewResourceNode

func (r ResourceType) NewResourceNode(
	node string,
	max uint64,
	min uint64,
	init uint64,
) (*ResourceNodeType, bool)

func (ResourceType) ResourceNodeDown

func (n ResourceType) ResourceNodeDown(node string, uid string) bool

Jump to

Keyboard shortcuts

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