client

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package client provides a sample implementation of a Locksmith client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Acquire(lockTag string) error
	Release(lockTag string) error
	Connect() error
	Close()
}

Client provides a simple interface for a Locksmith client.

func NewClient

func NewClient(options *ClientOptions) Client

type ClientOptions

type ClientOptions struct {
	Host       string
	Port       uint16
	TlsConfig  *tls.Config
	OnAcquired func(lockTag string)
}

ClientOptions to provide at client instantiation.

Jump to

Keyboard shortcuts

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