Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDir ¶
func LoadDir(cid, dir string, reg *LicenseRegistry) error
Types ¶
type LicenseQueue ¶
A LicenseQueue implements heap.Interface and holds Items.
func (LicenseQueue) Len ¶
func (pq LicenseQueue) Len() int
func (LicenseQueue) Less ¶
func (pq LicenseQueue) Less(i, j int) bool
func (*LicenseQueue) Pop ¶
func (pq *LicenseQueue) Pop() any
func (*LicenseQueue) Push ¶
func (pq *LicenseQueue) Push(x any)
func (LicenseQueue) Swap ¶
func (pq LicenseQueue) Swap(i, j int)
type LicenseRegistry ¶
type LicenseRegistry struct {
// contains filtered or unexported fields
}
func NewLicenseRegistry ¶
func NewLicenseRegistry(cacheDir string, rb *RecordBook) *LicenseRegistry
func (*LicenseRegistry) Add ¶
func (r *LicenseRegistry) Add(l *v1alpha1.License, c *v1alpha1.Contract)
func (*LicenseRegistry) LicenseForFeature ¶
func (r *LicenseRegistry) LicenseForFeature(feature string) (*v1alpha1.License, bool)
func (*LicenseRegistry) List ¶
func (r *LicenseRegistry) List() []*Record
type RecordBook ¶
type RecordBook struct {
// contains filtered or unexported fields
}
func NewRecordBook ¶
func NewRecordBook() *RecordBook
func (*RecordBook) Delete ¶
func (r *RecordBook) Delete(id string)
func (*RecordBook) Record ¶
func (r *RecordBook) Record(id string, features []string, user user.Info)
func (*RecordBook) UsedBy ¶
func (r *RecordBook) UsedBy(id string) (*proxyserver.LicenseStatusSpec, bool)
Click to show internal directories.
Click to hide internal directories.