client

package
v0.0.0-...-af5f245 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package client contains the client side librairies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the main object to manage the license-related permissions

func New

func New(conf Configuration) *Client

New creates a new Client, using the provided configuration.

func (*Client) Check

func (c *Client) Check()

Check the validity of the license, asynchroneously. If already locked, return immediately. What happens exactly depends on the configuration that was passed upon creation.

func (*Client) Close

func (c *Client) Close() error

Close release all Client ressources and locks client. All subsequent checks will fail.

func (*Client) Locked

func (c *Client) Locked() bool

Locked verify if Client was locked. No actual additionnal check is done.

type Configuration

type Configuration struct {
	License   string // license string or number, includes version number, licence serial number, etc ...
	ServerURL string // Server entry point. Set to empty string to disable all checks.

	OfflineLimit time.Duration // how long do we accept to run without a valid check online ?
	AutoRepeat   time.Duration // Automatically check with the provided period. Ignore if value is zero-value (not set).
}

Configuration parameters to construct a new Client.

Jump to

Keyboard shortcuts

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