locket

package module
v0.0.0-...-aa54b91 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 8

README

locket

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

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

Reporting issues and requesting features

Please report all issues and feature requests in cloudfoundry/diego-release.

Server

Diego Client for Setting/Fetching Locks and Presence

Client

There is currently one valid client

  1. the locket client which can be used with the locket service.

A general overview of the Locket API can be found here. You can learn more about Diego and its components at diego-design-notes.

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