Floating License
License Check
The CheckLicense function is not only used to validate the current license status, but also plays a role in floating licenses.
ld, err = lh.CheckLicense(ctx)
if err != nil {
return err
}Borrow
Floating licenses come with a predefined floating period—a time frame in which the license is valid on a given machine. If the license configuration allows, this period can be borrowed or extended for offline usage.
You can extend the floating period using one of two methods:
1
Release Floating License
If you no longer need the license on the current machine, or want to release a floating slot before the borrow period ends, you can call:
ld, err = lh.ReleaseFloatingLicense(ctx)
if err != nil {
return err
}This function immediately frees up the slot assigned to the current machine, making it available for others.
Was this helpful?