etcd: github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb Index | Files | Directories

package v3lockpb

import "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb"

Package v3lockpb is a generated protocol buffer package.

It is generated from these files:

v3lock.proto

It has these top-level messages:

LockRequest
LockResponse
UnlockRequest
UnlockResponse

Index

Package Files

v3lock.pb.go

Variables

var (
    ErrInvalidLengthV3Lock = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowV3Lock   = fmt.Errorf("proto: integer overflow")
)

func RegisterLockServer Uses

func RegisterLockServer(s *grpc.Server, srv LockServer)

type LockClient Uses

type LockClient interface {
    // Lock acquires a distributed shared lock on a given named lock.
    // On success, it will return a unique key that exists so long as the
    // lock is held by the caller. This key can be used in conjunction with
    // transactions to safely ensure updates to etcd only occur while holding
    // lock ownership. The lock is held until Unlock is called on the key or the
    // lease associate with the owner expires.
    Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
    // Unlock takes a key returned by Lock and releases the hold on lock. The
    // next Lock caller waiting for the lock will then be woken up and given
    // ownership of the lock.
    Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
}

func NewLockClient Uses

func NewLockClient(cc *grpc.ClientConn) LockClient

type LockRequest Uses

type LockRequest struct {
    // name is the identifier for the distributed shared lock to be acquired.
    Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // lease is the ID of the lease that will be attached to ownership of the
    // lock. If the lease expires or is revoked and currently holds the lock,
    // the lock is automatically released. Calls to Lock with the same lease will
    // be treated as a single acquisition; locking twice with the same lease is a
    // no-op.
    Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
}

func (*LockRequest) Descriptor Uses

func (*LockRequest) Descriptor() ([]byte, []int)

func (*LockRequest) GetLease Uses

func (m *LockRequest) GetLease() int64

func (*LockRequest) GetName Uses

func (m *LockRequest) GetName() []byte

func (*LockRequest) Marshal Uses

func (m *LockRequest) Marshal() (dAtA []byte, err error)

func (*LockRequest) MarshalTo Uses

func (m *LockRequest) MarshalTo(dAtA []byte) (int, error)

func (*LockRequest) ProtoMessage Uses

func (*LockRequest) ProtoMessage()

func (*LockRequest) Reset Uses

func (m *LockRequest) Reset()

func (*LockRequest) Size Uses

func (m *LockRequest) Size() (n int)

func (*LockRequest) String Uses

func (m *LockRequest) String() string

func (*LockRequest) Unmarshal Uses

func (m *LockRequest) Unmarshal(dAtA []byte) error

type LockResponse Uses

type LockResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
    // key is a key that will exist on etcd for the duration that the Lock caller
    // owns the lock. Users should not modify this key or the lock may exhibit
    // undefined behavior.
    Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

func (*LockResponse) Descriptor Uses

func (*LockResponse) Descriptor() ([]byte, []int)

func (*LockResponse) GetHeader Uses

func (m *LockResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*LockResponse) GetKey Uses

func (m *LockResponse) GetKey() []byte

func (*LockResponse) Marshal Uses

func (m *LockResponse) Marshal() (dAtA []byte, err error)

func (*LockResponse) MarshalTo Uses

func (m *LockResponse) MarshalTo(dAtA []byte) (int, error)

func (*LockResponse) ProtoMessage Uses

func (*LockResponse) ProtoMessage()

func (*LockResponse) Reset Uses

func (m *LockResponse) Reset()

func (*LockResponse) Size Uses

func (m *LockResponse) Size() (n int)

func (*LockResponse) String Uses

func (m *LockResponse) String() string

func (*LockResponse) Unmarshal Uses

func (m *LockResponse) Unmarshal(dAtA []byte) error

type LockServer Uses

type LockServer interface {
    // Lock acquires a distributed shared lock on a given named lock.
    // On success, it will return a unique key that exists so long as the
    // lock is held by the caller. This key can be used in conjunction with
    // transactions to safely ensure updates to etcd only occur while holding
    // lock ownership. The lock is held until Unlock is called on the key or the
    // lease associate with the owner expires.
    Lock(context.Context, *LockRequest) (*LockResponse, error)
    // Unlock takes a key returned by Lock and releases the hold on lock. The
    // next Lock caller waiting for the lock will then be woken up and given
    // ownership of the lock.
    Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
}

type UnlockRequest Uses

type UnlockRequest struct {
    // key is the lock ownership key granted by Lock.
    Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (*UnlockRequest) Descriptor Uses

func (*UnlockRequest) Descriptor() ([]byte, []int)

func (*UnlockRequest) GetKey Uses

func (m *UnlockRequest) GetKey() []byte

func (*UnlockRequest) Marshal Uses

func (m *UnlockRequest) Marshal() (dAtA []byte, err error)

func (*UnlockRequest) MarshalTo Uses

func (m *UnlockRequest) MarshalTo(dAtA []byte) (int, error)

func (*UnlockRequest) ProtoMessage Uses

func (*UnlockRequest) ProtoMessage()

func (*UnlockRequest) Reset Uses

func (m *UnlockRequest) Reset()

func (*UnlockRequest) Size Uses

func (m *UnlockRequest) Size() (n int)

func (*UnlockRequest) String Uses

func (m *UnlockRequest) String() string

func (*UnlockRequest) Unmarshal Uses

func (m *UnlockRequest) Unmarshal(dAtA []byte) error

type UnlockResponse Uses

type UnlockResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}

func (*UnlockResponse) Descriptor Uses

func (*UnlockResponse) Descriptor() ([]byte, []int)

func (*UnlockResponse) GetHeader Uses

func (m *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*UnlockResponse) Marshal Uses

func (m *UnlockResponse) Marshal() (dAtA []byte, err error)

func (*UnlockResponse) MarshalTo Uses

func (m *UnlockResponse) MarshalTo(dAtA []byte) (int, error)

func (*UnlockResponse) ProtoMessage Uses

func (*UnlockResponse) ProtoMessage()

func (*UnlockResponse) Reset Uses

func (m *UnlockResponse) Reset()

func (*UnlockResponse) Size Uses

func (m *UnlockResponse) Size() (n int)

func (*UnlockResponse) String Uses

func (m *UnlockResponse) String() string

func (*UnlockResponse) Unmarshal Uses

func (m *UnlockResponse) Unmarshal(dAtA []byte) error

Directories

PathSynopsis
gwPackage v3lockpb is a reverse proxy.

Package v3lockpb imports 8 packages (graph) and is imported by 100 packages. Updated 2018-05-22. Refresh now. Tools for package owners.