content

package
v1.7.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 385

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WriteAction_name = map[int32]string{
		0: "STAT",
		1: "WRITE",
		2: "COMMIT",
	}
	WriteAction_value = map[string]int32{
		"STAT":   0,
		"WRITE":  1,
		"COMMIT": 2,
	}
)

Enum value maps for WriteAction.

View Source
var Content_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "containerd.services.content.v1.Content",
	HandlerType: (*ContentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Content_Info_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Content_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Content_Delete_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Content_Status_Handler,
		},
		{
			MethodName: "ListStatuses",
			Handler:    _Content_ListStatuses_Handler,
		},
		{
			MethodName: "Abort",
			Handler:    _Content_Abort_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "List",
			Handler:       _Content_List_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Read",
			Handler:       _Content_Read_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Write",
			Handler:       _Content_Write_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "github.com/containerd/containerd/api/services/content/v1/content.proto",
}

Content_ServiceDesc is the grpc.ServiceDesc for Content service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_containerd_containerd_api_services_content_v1_content_proto protoreflect.FileDescriptor

Functions

func RegisterContentServer

func RegisterContentServer(s grpc.ServiceRegistrar, srv ContentServer)

Types

type AbortRequest

type AbortRequest struct {
	Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	// contains filtered or unexported fields
}

func (*AbortRequest) Descriptor deprecated

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

Deprecated: Use AbortRequest.ProtoReflect.Descriptor instead.

func (*AbortRequest) GetRef added in v1.7.0

func (x *AbortRequest) GetRef() string

func (*AbortRequest) ProtoMessage

func (*AbortRequest) ProtoMessage()

func (*AbortRequest) ProtoReflect added in v1.7.0

func (x *AbortRequest) ProtoReflect() protoreflect.Message

func (*AbortRequest) Reset

func (x *AbortRequest) Reset()

func (*AbortRequest) String

func (x *AbortRequest) String() string

type ContentClient

type ContentClient interface {
	// Info returns information about a committed object.
	//
	// This call can be used for getting the size of content and checking for
	// existence.
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	// Update updates content metadata.
	//
	// This call can be used to manage the mutable content labels. The
	// immutable metadata such as digest, size, and committed at cannot
	// be updated.
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	// List streams the entire set of content as Info objects and closes the
	// stream.
	//
	// Typically, this will yield a large response, chunked into messages.
	// Clients should make provisions to ensure they can handle the entire data
	// set.
	List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error)
	// Delete will delete the referenced object.
	Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Read allows one to read an object based on the offset into the content.
	//
	// The requested data may be returned in one or more messages.
	Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error)
	// Status returns the status for a single reference.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// ListStatuses returns the status of ongoing object ingestions, started via
	// Write.
	//
	// Only those matching the regular expression will be provided in the
	// response. If the provided regular expression is empty, all ingestions
	// will be provided.
	ListStatuses(ctx context.Context, in *ListStatusesRequest, opts ...grpc.CallOption) (*ListStatusesResponse, error)
	// Write begins or resumes writes to a resource identified by a unique ref.
	// Only one active stream may exist at a time for each ref.
	//
	// Once a write stream has started, it may only write to a single ref, thus
	// once a stream is started, the ref may be omitted on subsequent writes.
	//
	// For any write transaction represented by a ref, only a single write may
	// be made to a given offset. If overlapping writes occur, it is an error.
	// Writes should be sequential and implementations may throw an error if
	// this is required.
	//
	// If expected_digest is set and already part of the content store, the
	// write will fail.
	//
	// When completed, the commit flag should be set to true. If expected size
	// or digest is set, the content will be validated against those values.
	Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error)
	// Abort cancels the ongoing write named in the request. Any resources
	// associated with the write will be collected.
	Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ContentClient is the client API for Content 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 NewContentClient

func NewContentClient(cc grpc.ClientConnInterface) ContentClient

type ContentServer

type ContentServer interface {
	// Info returns information about a committed object.
	//
	// This call can be used for getting the size of content and checking for
	// existence.
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
	// Update updates content metadata.
	//
	// This call can be used to manage the mutable content labels. The
	// immutable metadata such as digest, size, and committed at cannot
	// be updated.
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	// List streams the entire set of content as Info objects and closes the
	// stream.
	//
	// Typically, this will yield a large response, chunked into messages.
	// Clients should make provisions to ensure they can handle the entire data
	// set.
	List(*ListContentRequest, Content_ListServer) error
	// Delete will delete the referenced object.
	Delete(context.Context, *DeleteContentRequest) (*emptypb.Empty, error)
	// Read allows one to read an object based on the offset into the content.
	//
	// The requested data may be returned in one or more messages.
	Read(*ReadContentRequest, Content_ReadServer) error
	// Status returns the status for a single reference.
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// ListStatuses returns the status of ongoing object ingestions, started via
	// Write.
	//
	// Only those matching the regular expression will be provided in the
	// response. If the provided regular expression is empty, all ingestions
	// will be provided.
	ListStatuses(context.Context, *ListStatusesRequest) (*ListStatusesResponse, error)
	// Write begins or resumes writes to a resource identified by a unique ref.
	// Only one active stream may exist at a time for each ref.
	//
	// Once a write stream has started, it may only write to a single ref, thus
	// once a stream is started, the ref may be omitted on subsequent writes.
	//
	// For any write transaction represented by a ref, only a single write may
	// be made to a given offset. If overlapping writes occur, it is an error.
	// Writes should be sequential and implementations may throw an error if
	// this is required.
	//
	// If expected_digest is set and already part of the content store, the
	// write will fail.
	//
	// When completed, the commit flag should be set to true. If expected size
	// or digest is set, the content will be validated against those values.
	Write(Content_WriteServer) error
	// Abort cancels the ongoing write named in the request. Any resources
	// associated with the write will be collected.
	Abort(context.Context, *AbortRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ContentServer is the server API for Content service. All implementations must embed UnimplementedContentServer for forward compatibility

type Content_ListClient

type Content_ListClient interface {
	Recv() (*ListContentResponse, error)
	grpc.ClientStream
}

type Content_ListServer

type Content_ListServer interface {
	Send(*ListContentResponse) error
	grpc.ServerStream
}

type Content_ReadClient

type Content_ReadClient interface {
	Recv() (*ReadContentResponse, error)
	grpc.ClientStream
}

type Content_ReadServer

type Content_ReadServer interface {
	Send(*ReadContentResponse) error
	grpc.ServerStream
}

type Content_WriteClient

type Content_WriteClient interface {
	Send(*WriteContentRequest) error
	Recv() (*WriteContentResponse, error)
	grpc.ClientStream
}

type Content_WriteServer

type Content_WriteServer interface {
	Send(*WriteContentResponse) error
	Recv() (*WriteContentRequest, error)
	grpc.ServerStream
}

type DeleteContentRequest

type DeleteContentRequest struct {

	// Digest specifies which content to delete.
	Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteContentRequest) Descriptor deprecated

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

Deprecated: Use DeleteContentRequest.ProtoReflect.Descriptor instead.

func (*DeleteContentRequest) GetDigest added in v1.7.0

func (x *DeleteContentRequest) GetDigest() string

func (*DeleteContentRequest) ProtoMessage

func (*DeleteContentRequest) ProtoMessage()

func (*DeleteContentRequest) ProtoReflect added in v1.7.0

func (x *DeleteContentRequest) ProtoReflect() protoreflect.Message

func (*DeleteContentRequest) Reset

func (x *DeleteContentRequest) Reset()

func (*DeleteContentRequest) String

func (x *DeleteContentRequest) String() string

type Info

type Info struct {

	// Digest is the hash identity of the blob.
	Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// Size is the total number of bytes in the blob.
	Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// CreatedAt provides the time at which the blob was committed.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// UpdatedAt provides the time the info was last updated.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Labels are arbitrary data on snapshots.
	//
	// The combined size of a key/value pair cannot exceed 4096 bytes.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetCreatedAt added in v1.7.0

func (x *Info) GetCreatedAt() *timestamppb.Timestamp

func (*Info) GetDigest added in v1.7.0

func (x *Info) GetDigest() string

func (*Info) GetLabels added in v1.7.0

func (x *Info) GetLabels() map[string]string

func (*Info) GetSize added in v1.7.0

func (x *Info) GetSize() int64

func (*Info) GetUpdatedAt added in v1.7.0

func (x *Info) GetUpdatedAt() *timestamppb.Timestamp

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect added in v1.7.0

func (x *Info) ProtoReflect() protoreflect.Message

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type InfoRequest

type InfoRequest struct {
	Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoRequest) Descriptor deprecated

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

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) GetDigest added in v1.7.0

func (x *InfoRequest) GetDigest() string

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect added in v1.7.0

func (x *InfoRequest) ProtoReflect() protoreflect.Message

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {
	Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoResponse) Descriptor deprecated

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

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetInfo added in v1.7.0

func (x *InfoResponse) GetInfo() *Info

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect added in v1.7.0

func (x *InfoResponse) ProtoReflect() protoreflect.Message

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type ListContentRequest

type ListContentRequest struct {

	// Filters contains one or more filters using the syntax defined in the
	// containerd filter package.
	//
	// The returned result will be those that match any of the provided
	// filters. Expanded, containers that match the following will be
	// returned:
	//
	//	filters[0] or filters[1] or ... or filters[n-1] or filters[n]
	//
	// If filters is zero-length or nil, all items will be returned.
	Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
	// contains filtered or unexported fields
}

func (*ListContentRequest) Descriptor deprecated

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

Deprecated: Use ListContentRequest.ProtoReflect.Descriptor instead.

func (*ListContentRequest) GetFilters added in v1.7.0

func (x *ListContentRequest) GetFilters() []string

func (*ListContentRequest) ProtoMessage

func (*ListContentRequest) ProtoMessage()

func (*ListContentRequest) ProtoReflect added in v1.7.0

func (x *ListContentRequest) ProtoReflect() protoreflect.Message

func (*ListContentRequest) Reset

func (x *ListContentRequest) Reset()

func (*ListContentRequest) String

func (x *ListContentRequest) String() string

type ListContentResponse

type ListContentResponse struct {
	Info []*Info `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*ListContentResponse) Descriptor deprecated

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

Deprecated: Use ListContentResponse.ProtoReflect.Descriptor instead.

func (*ListContentResponse) GetInfo added in v1.7.0

func (x *ListContentResponse) GetInfo() []*Info

func (*ListContentResponse) ProtoMessage

func (*ListContentResponse) ProtoMessage()

func (*ListContentResponse) ProtoReflect added in v1.7.0

func (x *ListContentResponse) ProtoReflect() protoreflect.Message

func (*ListContentResponse) Reset

func (x *ListContentResponse) Reset()

func (*ListContentResponse) String

func (x *ListContentResponse) String() string

type ListStatusesRequest

type ListStatusesRequest struct {
	Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
	// contains filtered or unexported fields
}

func (*ListStatusesRequest) Descriptor deprecated

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

Deprecated: Use ListStatusesRequest.ProtoReflect.Descriptor instead.

func (*ListStatusesRequest) GetFilters added in v1.7.0

func (x *ListStatusesRequest) GetFilters() []string

func (*ListStatusesRequest) ProtoMessage

func (*ListStatusesRequest) ProtoMessage()

func (*ListStatusesRequest) ProtoReflect added in v1.7.0

func (x *ListStatusesRequest) ProtoReflect() protoreflect.Message

func (*ListStatusesRequest) Reset

func (x *ListStatusesRequest) Reset()

func (*ListStatusesRequest) String

func (x *ListStatusesRequest) String() string

type ListStatusesResponse

type ListStatusesResponse struct {
	Statuses []*Status `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"`
	// contains filtered or unexported fields
}

func (*ListStatusesResponse) Descriptor deprecated

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

Deprecated: Use ListStatusesResponse.ProtoReflect.Descriptor instead.

func (*ListStatusesResponse) GetStatuses added in v1.7.0

func (x *ListStatusesResponse) GetStatuses() []*Status

func (*ListStatusesResponse) ProtoMessage

func (*ListStatusesResponse) ProtoMessage()

func (*ListStatusesResponse) ProtoReflect added in v1.7.0

func (x *ListStatusesResponse) ProtoReflect() protoreflect.Message

func (*ListStatusesResponse) Reset

func (x *ListStatusesResponse) Reset()

func (*ListStatusesResponse) String

func (x *ListStatusesResponse) String() string

type ReadContentRequest

type ReadContentRequest struct {

	// Digest is the hash identity to read.
	Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// Offset specifies the number of bytes from the start at which to begin
	// the read. If zero or less, the read will be from the start. This uses
	// standard zero-indexed semantics.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// size is the total size of the read. If zero, the entire blob will be
	// returned by the service.
	Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

ReadContentRequest defines the fields that make up a request to read a portion of data from a stored object.

func (*ReadContentRequest) Descriptor deprecated

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

Deprecated: Use ReadContentRequest.ProtoReflect.Descriptor instead.

func (*ReadContentRequest) GetDigest added in v1.7.0

func (x *ReadContentRequest) GetDigest() string

func (*ReadContentRequest) GetOffset added in v1.7.0

func (x *ReadContentRequest) GetOffset() int64

func (*ReadContentRequest) GetSize added in v1.7.0

func (x *ReadContentRequest) GetSize() int64

func (*ReadContentRequest) ProtoMessage

func (*ReadContentRequest) ProtoMessage()

func (*ReadContentRequest) ProtoReflect added in v1.7.0

func (x *ReadContentRequest) ProtoReflect() protoreflect.Message

func (*ReadContentRequest) Reset

func (x *ReadContentRequest) Reset()

func (*ReadContentRequest) String

func (x *ReadContentRequest) String() string

type ReadContentResponse

type ReadContentResponse struct {
	Offset int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // offset of the returned data
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`      // actual data
	// contains filtered or unexported fields
}

ReadContentResponse carries byte data for a read request.

func (*ReadContentResponse) Descriptor deprecated

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

Deprecated: Use ReadContentResponse.ProtoReflect.Descriptor instead.

func (*ReadContentResponse) GetData added in v1.7.0

func (x *ReadContentResponse) GetData() []byte

func (*ReadContentResponse) GetOffset added in v1.7.0

func (x *ReadContentResponse) GetOffset() int64

func (*ReadContentResponse) ProtoMessage

func (*ReadContentResponse) ProtoMessage()

func (*ReadContentResponse) ProtoReflect added in v1.7.0

func (x *ReadContentResponse) ProtoReflect() protoreflect.Message

func (*ReadContentResponse) Reset

func (x *ReadContentResponse) Reset()

func (*ReadContentResponse) String

func (x *ReadContentResponse) String() string

type Status

type Status struct {
	StartedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Ref       string                 `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
	Offset    int64                  `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Total     int64                  `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	Expected  string                 `protobuf:"bytes,6,opt,name=expected,proto3" json:"expected,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetExpected added in v1.7.0

func (x *Status) GetExpected() string

func (*Status) GetOffset added in v1.7.0

func (x *Status) GetOffset() int64

func (*Status) GetRef added in v1.7.0

func (x *Status) GetRef() string

func (*Status) GetStartedAt added in v1.7.0

func (x *Status) GetStartedAt() *timestamppb.Timestamp

func (*Status) GetTotal added in v1.7.0

func (x *Status) GetTotal() int64

func (*Status) GetUpdatedAt added in v1.7.0

func (x *Status) GetUpdatedAt() *timestamppb.Timestamp

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect added in v1.7.0

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type StatusRequest

type StatusRequest struct {
	Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetRef added in v1.7.0

func (x *StatusRequest) GetRef() string

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect added in v1.7.0

func (x *StatusRequest) ProtoReflect() protoreflect.Message

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetStatus added in v1.7.0

func (x *StatusResponse) GetStatus() *Status

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect added in v1.7.0

func (x *StatusResponse) ProtoReflect() protoreflect.Message

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedContentServer added in v1.4.0

type UnimplementedContentServer struct {
}

UnimplementedContentServer must be embedded to have forward compatible implementations.

func (UnimplementedContentServer) Abort added in v1.4.0

func (UnimplementedContentServer) Delete added in v1.4.0

func (UnimplementedContentServer) Info added in v1.4.0

func (UnimplementedContentServer) List added in v1.4.0

func (UnimplementedContentServer) ListStatuses added in v1.4.0

func (UnimplementedContentServer) Read added in v1.4.0

func (UnimplementedContentServer) Status added in v1.4.0

func (UnimplementedContentServer) Update added in v1.4.0

func (UnimplementedContentServer) Write added in v1.4.0

type UnsafeContentServer added in v1.7.0

type UnsafeContentServer interface {
	// contains filtered or unexported methods
}

UnsafeContentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ContentServer will result in compilation errors.

type UpdateRequest

type UpdateRequest struct {
	Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// UpdateMask specifies which fields to perform the update on. If empty,
	// the operation applies to all fields.
	//
	// In info, Digest, Size, and CreatedAt are immutable,
	// other field may be updated using this mask.
	// If no mask is provided, all mutable field are updated.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetInfo added in v1.7.0

func (x *UpdateRequest) GetInfo() *Info

func (*UpdateRequest) GetUpdateMask added in v1.7.0

func (x *UpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect added in v1.7.0

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

type UpdateResponse struct {
	Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetInfo added in v1.7.0

func (x *UpdateResponse) GetInfo() *Info

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect added in v1.7.0

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

type WriteAction

type WriteAction int32

WriteAction defines the behavior of a WriteRequest.

const (
	// WriteActionStat instructs the writer to return the current status while
	// holding the lock on the write.
	WriteAction_STAT WriteAction = 0
	// WriteActionWrite sets the action for the write request to write data.
	//
	// Any data included will be written at the provided offset. The
	// transaction will be left open for further writes.
	//
	// This is the default.
	WriteAction_WRITE WriteAction = 1
	// WriteActionCommit will write any outstanding data in the message and
	// commit the write, storing it under the digest.
	//
	// This can be used in a single message to send the data, verify it and
	// commit it.
	//
	// This action will always terminate the write.
	WriteAction_COMMIT WriteAction = 2
)

func (WriteAction) Descriptor added in v1.7.0

func (WriteAction) Enum added in v1.7.0

func (x WriteAction) Enum() *WriteAction

func (WriteAction) EnumDescriptor deprecated

func (WriteAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use WriteAction.Descriptor instead.

func (WriteAction) Number added in v1.7.0

func (x WriteAction) Number() protoreflect.EnumNumber

func (WriteAction) String

func (x WriteAction) String() string

func (WriteAction) Type added in v1.7.0

type WriteContentRequest

type WriteContentRequest struct {

	// Action sets the behavior of the write.
	//
	// When this is a write and the ref is not yet allocated, the ref will be
	// allocated and the data will be written at offset.
	//
	// If the action is write and the ref is allocated, it will accept data to
	// an offset that has not yet been written.
	//
	// If the action is write and there is no data, the current write status
	// will be returned. This works differently from status because the stream
	// holds a lock.
	Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"`
	// Ref identifies the pre-commit object to write to.
	Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
	// Total can be set to have the service validate the total size of the
	// committed content.
	//
	// The latest value before or with the commit action message will be use to
	// validate the content. If the offset overflows total, the service may
	// report an error. It is only required on one message for the write.
	//
	// If the value is zero or less, no validation of the final content will be
	// performed.
	Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	// Expected can be set to have the service validate the final content against
	// the provided digest.
	//
	// If the digest is already present in the object store, an AlreadyExists
	// error will be returned.
	//
	// Only the latest version will be used to check the content against the
	// digest. It is only required to include it on a single message, before or
	// with the commit action message.
	Expected string `protobuf:"bytes,4,opt,name=expected,proto3" json:"expected,omitempty"`
	// Offset specifies the number of bytes from the start at which to begin
	// the write. For most implementations, this means from the start of the
	// file. This uses standard, zero-indexed semantics.
	//
	// If the action is write, the remote may remove all previously written
	// data after the offset. Implementations may support arbitrary offsets but
	// MUST support reseting this value to zero with a write. If an
	// implementation does not support a write at a particular offset, an
	// OutOfRange error must be returned.
	Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
	// Data is the actual bytes to be written.
	//
	// If this is empty and the message is not a commit, a response will be
	// returned with the current write state.
	Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	// Labels are arbitrary data on snapshots.
	//
	// The combined size of a key/value pair cannot exceed 4096 bytes.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

WriteContentRequest writes data to the request ref at offset.

func (*WriteContentRequest) Descriptor deprecated

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

Deprecated: Use WriteContentRequest.ProtoReflect.Descriptor instead.

func (*WriteContentRequest) GetAction added in v1.7.0

func (x *WriteContentRequest) GetAction() WriteAction

func (*WriteContentRequest) GetData added in v1.7.0

func (x *WriteContentRequest) GetData() []byte

func (*WriteContentRequest) GetExpected added in v1.7.0

func (x *WriteContentRequest) GetExpected() string

func (*WriteContentRequest) GetLabels added in v1.7.0

func (x *WriteContentRequest) GetLabels() map[string]string

func (*WriteContentRequest) GetOffset added in v1.7.0

func (x *WriteContentRequest) GetOffset() int64

func (*WriteContentRequest) GetRef added in v1.7.0

func (x *WriteContentRequest) GetRef() string

func (*WriteContentRequest) GetTotal added in v1.7.0

func (x *WriteContentRequest) GetTotal() int64

func (*WriteContentRequest) ProtoMessage

func (*WriteContentRequest) ProtoMessage()

func (*WriteContentRequest) ProtoReflect added in v1.7.0

func (x *WriteContentRequest) ProtoReflect() protoreflect.Message

func (*WriteContentRequest) Reset

func (x *WriteContentRequest) Reset()

func (*WriteContentRequest) String

func (x *WriteContentRequest) String() string

type WriteContentResponse

type WriteContentResponse struct {

	// Action contains the action for the final message of the stream. A writer
	// should confirm that they match the intended result.
	Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"`
	// StartedAt provides the time at which the write began.
	//
	// This must be set for stat and commit write actions. All other write
	// actions may omit this.
	StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	// UpdatedAt provides the last time of a successful write.
	//
	// This must be set for stat and commit write actions. All other write
	// actions may omit this.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Offset is the current committed size for the write.
	Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	// Total provides the current, expected total size of the write.
	//
	// We include this to provide consistency with the Status structure on the
	// client writer.
	//
	// This is only valid on the Stat and Commit response.
	Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	// Digest, if present, includes the digest up to the currently committed
	// bytes. If action is commit, this field will be set. It is implementation
	// defined if this is set for other actions.
	Digest string `protobuf:"bytes,6,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

WriteContentResponse is returned on the culmination of a write call.

func (*WriteContentResponse) Descriptor deprecated

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

Deprecated: Use WriteContentResponse.ProtoReflect.Descriptor instead.

func (*WriteContentResponse) GetAction added in v1.7.0

func (x *WriteContentResponse) GetAction() WriteAction

func (*WriteContentResponse) GetDigest added in v1.7.0

func (x *WriteContentResponse) GetDigest() string

func (*WriteContentResponse) GetOffset added in v1.7.0

func (x *WriteContentResponse) GetOffset() int64

func (*WriteContentResponse) GetStartedAt added in v1.7.0

func (x *WriteContentResponse) GetStartedAt() *timestamppb.Timestamp

func (*WriteContentResponse) GetTotal added in v1.7.0

func (x *WriteContentResponse) GetTotal() int64

func (*WriteContentResponse) GetUpdatedAt added in v1.7.0

func (x *WriteContentResponse) GetUpdatedAt() *timestamppb.Timestamp

func (*WriteContentResponse) ProtoMessage

func (*WriteContentResponse) ProtoMessage()

func (*WriteContentResponse) ProtoReflect added in v1.7.0

func (x *WriteContentResponse) ProtoReflect() protoreflect.Message

func (*WriteContentResponse) Reset

func (x *WriteContentResponse) Reset()

func (*WriteContentResponse) String

func (x *WriteContentResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL