locket

package module
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 58 modules, 110 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Locket

Go Report Card Go Reference

Locket is a distributed locking service and client libraries to integrate with the service.

[!NOTE]

This repository should be imported as code.cloudfoundry.org/locket.

Docs

Contributing

See the Contributing.md for more information on how to contribute.

Working Group Charter

This repository is maintained by App Runtime Platform under Diego area.

[!IMPORTANT]

Content in this file is managed by the CI task sync-readme and is generated by CI following a convention.

Documentation

Index

Constants

View Source
const DBHealthCheckFailureThreshold = 3
View Source
const DBHealthCheckInterval = 10 * time.Second
View Source
const DBHealthCheckTimeout = 5 * time.Second
View Source
const DefaultSessionTTL = 15 * time.Second
View Source
const DefaultSessionTTLInSeconds int64 = 15
View Source
const ExpirationMetricsInterval = 60 * time.Second
View Source
const LockSchemaRoot = "v1/locks"
View Source
const MonitorRetryTime = 2 * time.Second
View Source
const RetryInterval = 5 * time.Second
View Source
const SQLRetryInterval = time.Second

Variables

This section is empty.

Functions

func LockSchemaPath

func LockSchemaPath(lockName ...string) string

func NewClient

func NewClient(logger lager.Logger, config ClientLocketConfig) (models.LocketClient, error)

func NewClientSkipCertVerify

func NewClientSkipCertVerify(logger lager.Logger, config ClientLocketConfig) (models.LocketClient, error)

Types

type ClientLocketConfig

type ClientLocketConfig struct {
	LocketAddress                string `json:"locket_address,omitempty" yaml:"locket_address,omitempty"`
	LocketCACertFile             string `json:"locket_ca_cert_file,omitempty" yaml:"locket_ca_cert_file,omitempty"`
	LocketClientCertFile         string `json:"locket_client_cert_file,omitempty" yaml:"locket_client_cert_file,omitempty"`
	LocketClientKeyFile          string `json:"locket_client_key_file,omitempty" yaml:"locket_client_key_file,omitempty"`
	LocketClientKeepAliveTime    int    `json:"locket_client_keepalive_time,omitempty" yaml:"locket_client_keepalive_time,omitempty"`
	LocketClientKeepAliveTimeout int    `json:"locket_client_keepalive_timeout,omitempty" yaml:"locket_client_keepalive_timeout,omitempty"`
}

Directories

Path Synopsis
cmd
locket command
db
dbfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
expirationfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
helpers/helpersfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
modelsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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