locket

package module
v0.0.0-...-08e0038 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 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

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