Back to godoc.org
go.etcd.io/etcd / lease / leasehttp

Package leasehttp

v3.1.10+incompatible
Latest Go to latest

The latest major version is .

Published: Jul 14, 2017 | License: Apache-2.0 | Module: go.etcd.io/etcd

Overview

Package leasehttp serves lease renewals made through HTTP requests.

Index

Variables

var (
	LeasePrefix         = "/leases"
	LeaseInternalPrefix = "/leases/internal"

	ErrLeaseHTTPTimeout = errors.New("waiting for node to catch up its applied index has timed out")
)

func NewHandler

func NewHandler(l lease.Lessor, waitch func() <-chan struct{}) http.Handler

NewHandler returns an http Handler for lease renewals

func RenewHTTP

func RenewHTTP(ctx context.Context, id lease.LeaseID, url string, rt http.RoundTripper) (int64, error)

RenewHTTP renews a lease at a given primary server. TODO: Batch request in future?

func TimeToLiveHTTP

func TimeToLiveHTTP(ctx context.Context, id lease.LeaseID, keys bool, url string, rt http.RoundTripper) (*leasepb.LeaseInternalResponse, error)

TimeToLiveHTTP retrieves lease information of the given lease ID.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier