locket

package module
v0.0.0-...-07ee8ad Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 105

README

Locket

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 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
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