sqldb

package
v0.0.0-...-895b022 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryAllLicenses = "SELECT id, vendor, feature, usage_state, last_state_change, reserved_by_node, used_by_process FROM license_state"

	NotifyLicenseState = "NOTIFY license_state_update_channel"

	StateFree = "FREE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

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

func OpenTable

func OpenTable(ctx context.Context, connStr string, table string, nodeID string) (*Table, error)

func (*Table) Chan

func (t *Table) Chan(ctx context.Context) chan struct{}

func (*Table) GetCurrent

func (t *Table) GetCurrent(ctx context.Context) ([]*types.License, error)

func (*Table) Reserve

func (t *Table) Reserve(ctx context.Context, licenseIDs []string, node string) (ret []*types.License, retErr error)

func (*Table) UpdateInUse

func (t *Table) UpdateInUse(ctx context.Context, licenses []*types.License) (retErr error)

Jump to

Keyboard shortcuts

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