etcd: go.etcd.io/etcd/lease/leasehttp Index | Files

package leasehttp

import "go.etcd.io/etcd/lease/leasehttp"

Package leasehttp serves lease renewals made through HTTP requests.

Index

Package Files

doc.go http.go

Variables

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

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

func NewHandler Uses

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

NewHandler returns an http Handler for lease renewals

func RenewHTTP Uses

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 Uses

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.

Package leasehttp imports 11 packages (graph) and is imported by 17 packages. Updated 2018-08-29. Refresh now. Tools for package owners.