MCPcopy
hub / github.com/etcd-io/etcd / Session

Struct Session

client/v3/concurrency/session.go:30–38  ·  view source on GitHub ↗

Session represents a lease kept alive for the lifetime of a client. Fault-tolerant applications may use sessions to reason about liveness.

Source from the content-addressed store, hash-verified

28// Session represents a lease kept alive for the lifetime of a client.
29// Fault-tolerant applications may use sessions to reason about liveness.
30type Session struct {
31 client *v3.Client
32 opts *sessionOptions
33 id v3.LeaseID
34
35 ctx context.Context
36 cancel context.CancelFunc
37 donec <-chan struct{}
38}
39
40// NewSession gets the leased session for a client.
41func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected