client

package
v0.0.0-...-98ac406 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Standalone

func Standalone(kubeconfig string, kind string, unit string, amount int, applicationIdentifier string) (bool, error)

Standalone looks for a license in the application's namespace that fulfills the kind, unit and amount parameters. This method does not create a request object, nor does it require the presence of any custom resources. Secrets with the label of licensing.cattle.io/license: "true" will be queried until a satisfactory license is found If no satisfactory license is located, this method returns false

Types

type LicenseClient

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

func NewLicenseClient

func NewLicenseClient(kubeconfig string) (*LicenseClient, error)

func (*LicenseClient) License

func (l *LicenseClient) License(kind string, unit string, amount int, applicationIdentifier string) bool

License submits a request for licensing of the calling code application. A particular entitlement is identified by kind and unit. A request will be created with these properties as well as the amount. Passing a non-nil applicationIdentifier will use that value to search for a Request object. This method blocks until the software is licensed.

func (*LicenseClient) LicenseAsync

func (l *LicenseClient) LicenseAsync(kind string, unit string, amount int, notify chan<- bool, applicationIdentifier string)

LicenseAsync submits a request for licensing of the calling code application. Arguments are the same as License, with the exception of notify. Upon successful licensure, notify will emit a bool:true value. If the software becomes unlicensed, notify will emit a bool:false value.

type LicenseStatus

type LicenseStatus string

Directories

Path Synopsis
generated

Jump to

Keyboard shortcuts

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