Documentation
¶
Index ¶
- Variables
- func RegisterLeasesServer(s grpc.ServiceRegistrar, srv LeasesServer)
- type AddResourceRequest
- func (*AddResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddResourceRequest) GetID() string
- func (x *AddResourceRequest) GetResource() *Resource
- func (*AddResourceRequest) ProtoMessage()
- func (x *AddResourceRequest) ProtoReflect() protoreflect.Message
- func (x *AddResourceRequest) Reset()
- func (x *AddResourceRequest) String() string
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetID() string
- func (x *CreateRequest) GetLabels() map[string]string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetID() string
- func (x *DeleteRequest) GetSync() bool
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type DeleteResourceRequest
- func (*DeleteResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteResourceRequest) GetID() string
- func (x *DeleteResourceRequest) GetResource() *Resource
- func (*DeleteResourceRequest) ProtoMessage()
- func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteResourceRequest) Reset()
- func (x *DeleteResourceRequest) String() string
- type Lease
- func (*Lease) Descriptor() ([]byte, []int)deprecated
- func (x *Lease) GetCreatedAt() *timestamppb.Timestamp
- func (x *Lease) GetID() string
- func (x *Lease) GetLabels() map[string]string
- func (*Lease) ProtoMessage()
- func (x *Lease) ProtoReflect() protoreflect.Message
- func (x *Lease) Reset()
- func (x *Lease) String() string
- type LeasesClient
- type LeasesServer
- type ListRequest
- type ListResourcesRequest
- func (*ListResourcesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesRequest) GetID() string
- func (*ListResourcesRequest) ProtoMessage()
- func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
- func (x *ListResourcesRequest) Reset()
- func (x *ListResourcesRequest) String() string
- type ListResourcesResponse
- func (*ListResourcesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesResponse) GetResources() []*Resource
- func (*ListResourcesResponse) ProtoMessage()
- func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
- func (x *ListResourcesResponse) Reset()
- func (x *ListResourcesResponse) String() string
- type ListResponse
- type Resource
- type UnimplementedLeasesServer
- func (UnimplementedLeasesServer) AddResource(context.Context, *AddResourceRequest) (*emptypb.Empty, error)
- func (UnimplementedLeasesServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedLeasesServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedLeasesServer) DeleteResource(context.Context, *DeleteResourceRequest) (*emptypb.Empty, error)
- func (UnimplementedLeasesServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedLeasesServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
- type UnsafeLeasesServer
Constants ¶
This section is empty.
Variables ¶
var File_github_com_containerd_containerd_api_services_leases_v1_leases_proto protoreflect.FileDescriptor
var Leases_ServiceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.leases.v1.Leases", HandlerType: (*LeasesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Leases_Create_Handler, }, { MethodName: "Delete", Handler: _Leases_Delete_Handler, }, { MethodName: "List", Handler: _Leases_List_Handler, }, { MethodName: "AddResource", Handler: _Leases_AddResource_Handler, }, { MethodName: "DeleteResource", Handler: _Leases_DeleteResource_Handler, }, { MethodName: "ListResources", Handler: _Leases_ListResources_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/leases/v1/leases.proto", }
Leases_ServiceDesc is the grpc.ServiceDesc for Leases service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLeasesServer ¶
func RegisterLeasesServer(s grpc.ServiceRegistrar, srv LeasesServer)
Types ¶
type AddResourceRequest ¶
type AddResourceRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
func (*AddResourceRequest) Descriptor
deprecated
func (*AddResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddResourceRequest.ProtoReflect.Descriptor instead.
func (*AddResourceRequest) GetID ¶
func (x *AddResourceRequest) GetID() string
func (*AddResourceRequest) GetResource ¶
func (x *AddResourceRequest) GetResource() *Resource
func (*AddResourceRequest) ProtoMessage ¶
func (*AddResourceRequest) ProtoMessage()
func (*AddResourceRequest) ProtoReflect ¶
func (x *AddResourceRequest) ProtoReflect() protoreflect.Message
func (*AddResourceRequest) Reset ¶
func (x *AddResourceRequest) Reset()
func (*AddResourceRequest) String ¶
func (x *AddResourceRequest) String() string
type CreateRequest ¶
type CreateRequest struct { // ID is used to identity the lease, when the id is not set the service // generates a random identifier for the lease. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetID ¶
func (x *CreateRequest) GetID() string
func (*CreateRequest) GetLabels ¶
func (x *CreateRequest) GetLabels() map[string]string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Lease *Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetLease ¶
func (x *CreateResponse) GetLease() *Lease
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Sync indicates that the delete and cleanup should be done // synchronously before returning to the caller // // Default is false Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetID ¶
func (x *DeleteRequest) GetID() string
func (*DeleteRequest) GetSync ¶
func (x *DeleteRequest) GetSync() bool
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResourceRequest ¶
type DeleteResourceRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
func (*DeleteResourceRequest) Descriptor
deprecated
func (*DeleteResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead.
func (*DeleteResourceRequest) GetID ¶
func (x *DeleteResourceRequest) GetID() string
func (*DeleteResourceRequest) GetResource ¶
func (x *DeleteResourceRequest) GetResource() *Resource
func (*DeleteResourceRequest) ProtoMessage ¶
func (*DeleteResourceRequest) ProtoMessage()
func (*DeleteResourceRequest) ProtoReflect ¶
func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message
func (*DeleteResourceRequest) Reset ¶
func (x *DeleteResourceRequest) Reset()
func (*DeleteResourceRequest) String ¶
func (x *DeleteResourceRequest) String() string
type Lease ¶
type Lease struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
Lease is an object which retains resources while it exists.
func (*Lease) Descriptor
deprecated
func (*Lease) GetCreatedAt ¶
func (x *Lease) GetCreatedAt() *timestamppb.Timestamp
func (*Lease) ProtoMessage ¶
func (*Lease) ProtoMessage()
func (*Lease) ProtoReflect ¶
func (x *Lease) ProtoReflect() protoreflect.Message
type LeasesClient ¶
type LeasesClient interface { // Create creates a new lease for managing changes to metadata. A lease // can be used to protect objects from being removed. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Delete deletes the lease and makes any unreferenced objects created // during the lease eligible for garbage collection if not referenced // or retained by other resources during the lease. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // List lists all active leases, returning the full list of // leases and optionally including the referenced resources. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // AddResource references the resource by the provided lease. AddResource(ctx context.Context, in *AddResourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteResource dereferences the resource by the provided lease. DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // ListResources lists all the resources referenced by the lease. ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) }
LeasesClient is the client API for Leases service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewLeasesClient ¶
func NewLeasesClient(cc grpc.ClientConnInterface) LeasesClient
type LeasesServer ¶
type LeasesServer interface { // Create creates a new lease for managing changes to metadata. A lease // can be used to protect objects from being removed. Create(context.Context, *CreateRequest) (*CreateResponse, error) // Delete deletes the lease and makes any unreferenced objects created // during the lease eligible for garbage collection if not referenced // or retained by other resources during the lease. Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) // List lists all active leases, returning the full list of // leases and optionally including the referenced resources. List(context.Context, *ListRequest) (*ListResponse, error) // AddResource references the resource by the provided lease. AddResource(context.Context, *AddResourceRequest) (*emptypb.Empty, error) // DeleteResource dereferences the resource by the provided lease. DeleteResource(context.Context, *DeleteResourceRequest) (*emptypb.Empty, error) // ListResources lists all the resources referenced by the lease. ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) // contains filtered or unexported methods }
LeasesServer is the server API for Leases service. All implementations must embed UnimplementedLeasesServer for forward compatibility
type ListRequest ¶
type ListRequest struct { Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetFilters ¶
func (x *ListRequest) GetFilters() []string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResourcesRequest ¶
type ListResourcesRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesRequest) Descriptor
deprecated
func (*ListResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.
func (*ListResourcesRequest) GetID ¶
func (x *ListResourcesRequest) GetID() string
func (*ListResourcesRequest) ProtoMessage ¶
func (*ListResourcesRequest) ProtoMessage()
func (*ListResourcesRequest) ProtoReflect ¶
func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
func (*ListResourcesRequest) Reset ¶
func (x *ListResourcesRequest) Reset()
func (*ListResourcesRequest) String ¶
func (x *ListResourcesRequest) String() string
type ListResourcesResponse ¶
type ListResourcesResponse struct { Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesResponse) Descriptor
deprecated
func (*ListResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.
func (*ListResourcesResponse) GetResources ¶
func (x *ListResourcesResponse) GetResources() []*Resource
func (*ListResourcesResponse) ProtoMessage ¶
func (*ListResourcesResponse) ProtoMessage()
func (*ListResourcesResponse) ProtoReflect ¶
func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
func (*ListResourcesResponse) Reset ¶
func (x *ListResourcesResponse) Reset()
func (*ListResourcesResponse) String ¶
func (x *ListResourcesResponse) String() string
type ListResponse ¶
type ListResponse struct { Leases []*Lease `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetLeases ¶
func (x *ListResponse) GetLeases() []*Lease
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type Resource ¶
type Resource struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // For snapshotter resource, there are many snapshotter types here, like // overlayfs, devmapper etc. The type will be formatted with type, // like "snapshotter/overlayfs". Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Resource) Descriptor
deprecated
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type UnimplementedLeasesServer ¶
type UnimplementedLeasesServer struct { }
UnimplementedLeasesServer must be embedded to have forward compatible implementations.
func (UnimplementedLeasesServer) AddResource ¶
func (UnimplementedLeasesServer) AddResource(context.Context, *AddResourceRequest) (*emptypb.Empty, error)
func (UnimplementedLeasesServer) Create ¶
func (UnimplementedLeasesServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedLeasesServer) Delete ¶
func (UnimplementedLeasesServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedLeasesServer) DeleteResource ¶
func (UnimplementedLeasesServer) DeleteResource(context.Context, *DeleteResourceRequest) (*emptypb.Empty, error)
func (UnimplementedLeasesServer) List ¶
func (UnimplementedLeasesServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedLeasesServer) ListResources ¶
func (UnimplementedLeasesServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
type UnsafeLeasesServer ¶
type UnsafeLeasesServer interface {
// contains filtered or unexported methods
}
UnsafeLeasesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LeasesServer will result in compilation errors.