Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAssetProviderServer(s grpc.ServiceRegistrar, srv AssetProviderServer)
- func RegisterControlProviderServer(s grpc.ServiceRegistrar, srv ControlProviderServer)
- func RegisterNodeProviderServer(s grpc.ServiceRegistrar, srv NodeProviderServer)
- type AssetProviderClient
- type AssetProviderServer
- type CleanupSnapshotRequest
- func (*CleanupSnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CleanupSnapshotRequest) GetSnapshotUri() string
- func (*CleanupSnapshotRequest) ProtoMessage()
- func (x *CleanupSnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *CleanupSnapshotRequest) Reset()
- func (x *CleanupSnapshotRequest) String() string
- type CleanupSnapshotResponse
- type ControlProviderClient
- type ControlProviderServer
- type CopySnapshotRequest
- func (*CopySnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CopySnapshotRequest) GetDstUri() string
- func (x *CopySnapshotRequest) GetSrcUri() string
- func (*CopySnapshotRequest) ProtoMessage()
- func (x *CopySnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *CopySnapshotRequest) Reset()
- func (x *CopySnapshotRequest) String() string
- type CopySnapshotResponse
- type FetchAssetRequest
- func (*FetchAssetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchAssetRequest) GetAssetUri() string
- func (x *FetchAssetRequest) GetMaxBytes() int64
- func (x *FetchAssetRequest) GetSha256() string
- func (x *FetchAssetRequest) GetWritePath() string
- func (*FetchAssetRequest) ProtoMessage()
- func (x *FetchAssetRequest) ProtoReflect() protoreflect.Message
- func (x *FetchAssetRequest) Reset()
- func (x *FetchAssetRequest) String() string
- type FetchAssetResponse
- type FetchSnapshotRequest
- func (*FetchSnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchSnapshotRequest) GetActorJwt() string
- func (x *FetchSnapshotRequest) GetFiles() []string
- func (x *FetchSnapshotRequest) GetSnapshotUri() string
- func (x *FetchSnapshotRequest) GetWritePath() string
- func (*FetchSnapshotRequest) ProtoMessage()
- func (x *FetchSnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *FetchSnapshotRequest) Reset()
- func (x *FetchSnapshotRequest) String() string
- type FetchSnapshotResponse
- type NodeProviderClient
- type NodeProviderServer
- type UnimplementedAssetProviderServer
- type UnimplementedControlProviderServer
- type UnimplementedNodeProviderServer
- type UnsafeAssetProviderServer
- type UnsafeControlProviderServer
- type UnsafeNodeProviderServer
- type UploadSnapshotRequest
- func (*UploadSnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadSnapshotRequest) GetActorJwt() string
- func (x *UploadSnapshotRequest) GetFiles() []string
- func (x *UploadSnapshotRequest) GetLocalPath() string
- func (x *UploadSnapshotRequest) GetSnapshotUri() string
- func (*UploadSnapshotRequest) ProtoMessage()
- func (x *UploadSnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *UploadSnapshotRequest) Reset()
- func (x *UploadSnapshotRequest) String() string
- type UploadSnapshotResponse
Constants ¶
const ( NodeProvider_FetchSnapshot_FullMethodName = "/objectstore.v1.NodeProvider/FetchSnapshot" NodeProvider_UploadSnapshot_FullMethodName = "/objectstore.v1.NodeProvider/UploadSnapshot" )
const ( ControlProvider_CleanupSnapshot_FullMethodName = "/objectstore.v1.ControlProvider/CleanupSnapshot" ControlProvider_CopySnapshot_FullMethodName = "/objectstore.v1.ControlProvider/CopySnapshot" )
const (
AssetProvider_FetchAsset_FullMethodName = "/objectstore.v1.AssetProvider/FetchAsset"
)
Variables ¶
var AssetProvider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "objectstore.v1.AssetProvider", HandlerType: (*AssetProviderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FetchAsset", Handler: _AssetProvider_FetchAsset_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "objectstore.proto", }
AssetProvider_ServiceDesc is the grpc.ServiceDesc for AssetProvider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ControlProvider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "objectstore.v1.ControlProvider", HandlerType: (*ControlProviderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CleanupSnapshot", Handler: _ControlProvider_CleanupSnapshot_Handler, }, { MethodName: "CopySnapshot", Handler: _ControlProvider_CopySnapshot_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "objectstore.proto", }
ControlProvider_ServiceDesc is the grpc.ServiceDesc for ControlProvider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_objectstore_proto protoreflect.FileDescriptor
var NodeProvider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "objectstore.v1.NodeProvider", HandlerType: (*NodeProviderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FetchSnapshot", Handler: _NodeProvider_FetchSnapshot_Handler, }, { MethodName: "UploadSnapshot", Handler: _NodeProvider_UploadSnapshot_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "objectstore.proto", }
NodeProvider_ServiceDesc is the grpc.ServiceDesc for NodeProvider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAssetProviderServer ¶
func RegisterAssetProviderServer(s grpc.ServiceRegistrar, srv AssetProviderServer)
func RegisterControlProviderServer ¶
func RegisterControlProviderServer(s grpc.ServiceRegistrar, srv ControlProviderServer)
func RegisterNodeProviderServer ¶
func RegisterNodeProviderServer(s grpc.ServiceRegistrar, srv NodeProviderServer)
Types ¶
type AssetProviderClient ¶
type AssetProviderClient interface {
// FetchAsset writes the object at asset_uri to write_path if, and only if,
// its content hashes to sha256. Nothing is written to write_path otherwise.
// It returns PERMISSION_DENIED if asset_uri, or any prefix of it, is a
// snapshot or tag URI, before reading anything; NOT_FOUND if the object does
// not exist; and FAILED_PRECONDITION if the object is larger than max_bytes
// or than the plugin can hold while verifying it, or its sha256 does not
// match.
FetchAsset(ctx context.Context, in *FetchAssetRequest, opts ...grpc.CallOption) (*FetchAssetResponse, error)
}
AssetProviderClient is the client API for AssetProvider 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.
AssetProvider is the plugin API an object storage platform implements on every node, next to NodeProvider, to serve sandbox runtime assets (the files a SandboxConfig names, such as a micro-VM kernel and guest image). atelet calls it for every asset. It reads a gs:// asset anonymously only if the plugin returns NOT_FOUND, INVALID_ARGUMENT, UNIMPLEMENTED, UNAVAILABLE or INTERNAL for it; any other failure is final. A plugin should return INTERNAL only for failures it does not recognize, since atelet then tries the asset anonymously.
An asset is pinned by its sha256, so the plugin hands back an object only if the caller already knows its content. The plugin must also refuse to read anything stored under a snapshot location: an asset URI never names a snapshot, a snapshot's file, or a tag.
func NewAssetProviderClient ¶
func NewAssetProviderClient(cc grpc.ClientConnInterface) AssetProviderClient
type AssetProviderServer ¶
type AssetProviderServer interface {
// FetchAsset writes the object at asset_uri to write_path if, and only if,
// its content hashes to sha256. Nothing is written to write_path otherwise.
// It returns PERMISSION_DENIED if asset_uri, or any prefix of it, is a
// snapshot or tag URI, before reading anything; NOT_FOUND if the object does
// not exist; and FAILED_PRECONDITION if the object is larger than max_bytes
// or than the plugin can hold while verifying it, or its sha256 does not
// match.
FetchAsset(context.Context, *FetchAssetRequest) (*FetchAssetResponse, error)
// contains filtered or unexported methods
}
AssetProviderServer is the server API for AssetProvider service. All implementations must embed UnimplementedAssetProviderServer for forward compatibility.
AssetProvider is the plugin API an object storage platform implements on every node, next to NodeProvider, to serve sandbox runtime assets (the files a SandboxConfig names, such as a micro-VM kernel and guest image). atelet calls it for every asset. It reads a gs:// asset anonymously only if the plugin returns NOT_FOUND, INVALID_ARGUMENT, UNIMPLEMENTED, UNAVAILABLE or INTERNAL for it; any other failure is final. A plugin should return INTERNAL only for failures it does not recognize, since atelet then tries the asset anonymously.
An asset is pinned by its sha256, so the plugin hands back an object only if the caller already knows its content. The plugin must also refuse to read anything stored under a snapshot location: an asset URI never names a snapshot, a snapshot's file, or a tag.
type CleanupSnapshotRequest ¶
type CleanupSnapshotRequest struct {
// A snapshot URI, or the prefix of a resource that owns several snapshots
// (e.g. gs://<bucket>/<root>/atespaces/<atespace>/actors/<uid>). Every file
// below it is deleted. A bare bucket is rejected with INVALID_ARGUMENT.
SnapshotUri string `protobuf:"bytes,1,opt,name=snapshot_uri,json=snapshotUri,proto3" json:"snapshot_uri,omitempty"`
// contains filtered or unexported fields
}
CleanupSnapshotRequest names the snapshots to delete.
func (*CleanupSnapshotRequest) Descriptor
deprecated
func (*CleanupSnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use CleanupSnapshotRequest.ProtoReflect.Descriptor instead.
func (*CleanupSnapshotRequest) GetSnapshotUri ¶
func (x *CleanupSnapshotRequest) GetSnapshotUri() string
func (*CleanupSnapshotRequest) ProtoMessage ¶
func (*CleanupSnapshotRequest) ProtoMessage()
func (*CleanupSnapshotRequest) ProtoReflect ¶
func (x *CleanupSnapshotRequest) ProtoReflect() protoreflect.Message
func (*CleanupSnapshotRequest) Reset ¶
func (x *CleanupSnapshotRequest) Reset()
func (*CleanupSnapshotRequest) String ¶
func (x *CleanupSnapshotRequest) String() string
type CleanupSnapshotResponse ¶
type CleanupSnapshotResponse struct {
// contains filtered or unexported fields
}
func (*CleanupSnapshotResponse) Descriptor
deprecated
func (*CleanupSnapshotResponse) Descriptor() ([]byte, []int)
Deprecated: Use CleanupSnapshotResponse.ProtoReflect.Descriptor instead.
func (*CleanupSnapshotResponse) ProtoMessage ¶
func (*CleanupSnapshotResponse) ProtoMessage()
func (*CleanupSnapshotResponse) ProtoReflect ¶
func (x *CleanupSnapshotResponse) ProtoReflect() protoreflect.Message
func (*CleanupSnapshotResponse) Reset ¶
func (x *CleanupSnapshotResponse) Reset()
func (*CleanupSnapshotResponse) String ¶
func (x *CleanupSnapshotResponse) String() string
type ControlProviderClient ¶
type ControlProviderClient interface {
// CleanupSnapshot deletes every file of a snapshot, or of every snapshot
// under an owner's prefix. Deleting an absent snapshot succeeds.
CleanupSnapshot(ctx context.Context, in *CleanupSnapshotRequest, opts ...grpc.CallOption) (*CleanupSnapshotResponse, error)
// CopySnapshot copies every file of src_uri to dst_uri, overwriting files
// already at dst_uri. src_uri and dst_uri may be in different buckets. It
// returns FAILED_PRECONDITION if src_uri holds no files.
CopySnapshot(ctx context.Context, in *CopySnapshotRequest, opts ...grpc.CallOption) (*CopySnapshotResponse, error)
}
ControlProviderClient is the client API for ControlProvider 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.
ControlProvider is the plugin API an object storage platform implements for the control plane. ate-api-server calls it to manage whole snapshots.
func NewControlProviderClient ¶
func NewControlProviderClient(cc grpc.ClientConnInterface) ControlProviderClient
type ControlProviderServer ¶
type ControlProviderServer interface {
// CleanupSnapshot deletes every file of a snapshot, or of every snapshot
// under an owner's prefix. Deleting an absent snapshot succeeds.
CleanupSnapshot(context.Context, *CleanupSnapshotRequest) (*CleanupSnapshotResponse, error)
// CopySnapshot copies every file of src_uri to dst_uri, overwriting files
// already at dst_uri. src_uri and dst_uri may be in different buckets. It
// returns FAILED_PRECONDITION if src_uri holds no files.
CopySnapshot(context.Context, *CopySnapshotRequest) (*CopySnapshotResponse, error)
// contains filtered or unexported methods
}
ControlProviderServer is the server API for ControlProvider service. All implementations must embed UnimplementedControlProviderServer for forward compatibility.
ControlProvider is the plugin API an object storage platform implements for the control plane. ate-api-server calls it to manage whole snapshots.
type CopySnapshotRequest ¶
type CopySnapshotRequest struct {
// The URI to copy from, e.g. an actor's snapshot.
SrcUri string `protobuf:"bytes,1,opt,name=src_uri,json=srcUri,proto3" json:"src_uri,omitempty"`
// The URI to copy to, e.g. a tag's prefix.
DstUri string `protobuf:"bytes,2,opt,name=dst_uri,json=dstUri,proto3" json:"dst_uri,omitempty"`
// contains filtered or unexported fields
}
CopySnapshotRequest names the source and destination snapshots.
func (*CopySnapshotRequest) Descriptor
deprecated
func (*CopySnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use CopySnapshotRequest.ProtoReflect.Descriptor instead.
func (*CopySnapshotRequest) GetDstUri ¶
func (x *CopySnapshotRequest) GetDstUri() string
func (*CopySnapshotRequest) GetSrcUri ¶
func (x *CopySnapshotRequest) GetSrcUri() string
func (*CopySnapshotRequest) ProtoMessage ¶
func (*CopySnapshotRequest) ProtoMessage()
func (*CopySnapshotRequest) ProtoReflect ¶
func (x *CopySnapshotRequest) ProtoReflect() protoreflect.Message
func (*CopySnapshotRequest) Reset ¶
func (x *CopySnapshotRequest) Reset()
func (*CopySnapshotRequest) String ¶
func (x *CopySnapshotRequest) String() string
type CopySnapshotResponse ¶
type CopySnapshotResponse struct {
// contains filtered or unexported fields
}
func (*CopySnapshotResponse) Descriptor
deprecated
func (*CopySnapshotResponse) Descriptor() ([]byte, []int)
Deprecated: Use CopySnapshotResponse.ProtoReflect.Descriptor instead.
func (*CopySnapshotResponse) ProtoMessage ¶
func (*CopySnapshotResponse) ProtoMessage()
func (*CopySnapshotResponse) ProtoReflect ¶
func (x *CopySnapshotResponse) ProtoReflect() protoreflect.Message
func (*CopySnapshotResponse) Reset ¶
func (x *CopySnapshotResponse) Reset()
func (*CopySnapshotResponse) String ¶
func (x *CopySnapshotResponse) String() string
type FetchAssetRequest ¶
type FetchAssetRequest struct {
// The object to read, e.g. gs://<bucket>/kata-assets/vmlinux. Which schemes
// a plugin serves is up to the plugin. At most 2048 bytes, the SandboxConfig
// URL's limit. Masked in logged requests, like the SandboxConfig URL it
// comes from.
AssetUri string `protobuf:"bytes,1,opt,name=asset_uri,json=assetUri,proto3" json:"asset_uri,omitempty"`
// The expected SHA-256 of the object's content, as 64 lower-case hex
// characters.
Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"`
// Full local path of an existing regular file the asset is written to. The
// plugin replaces the file, keeping its mode, only once the content has been
// verified, never creates it, and leaves it unchanged on any error. The
// caller opens it after the call: a descriptor opened before still reads
// the old content.
WritePath string `protobuf:"bytes,3,opt,name=write_path,json=writePath,proto3" json:"write_path,omitempty"`
// The largest object, in bytes, the caller accepts. Must be positive.
MaxBytes int64 `protobuf:"varint,4,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
// contains filtered or unexported fields
}
FetchAssetRequest asks the plugin to fetch one content-addressed asset.
func (*FetchAssetRequest) Descriptor
deprecated
func (*FetchAssetRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchAssetRequest.ProtoReflect.Descriptor instead.
func (*FetchAssetRequest) GetAssetUri ¶
func (x *FetchAssetRequest) GetAssetUri() string
func (*FetchAssetRequest) GetMaxBytes ¶
func (x *FetchAssetRequest) GetMaxBytes() int64
func (*FetchAssetRequest) GetSha256 ¶
func (x *FetchAssetRequest) GetSha256() string
func (*FetchAssetRequest) GetWritePath ¶
func (x *FetchAssetRequest) GetWritePath() string
func (*FetchAssetRequest) ProtoMessage ¶
func (*FetchAssetRequest) ProtoMessage()
func (*FetchAssetRequest) ProtoReflect ¶
func (x *FetchAssetRequest) ProtoReflect() protoreflect.Message
func (*FetchAssetRequest) Reset ¶
func (x *FetchAssetRequest) Reset()
func (*FetchAssetRequest) String ¶
func (x *FetchAssetRequest) String() string
type FetchAssetResponse ¶
type FetchAssetResponse struct {
// contains filtered or unexported fields
}
func (*FetchAssetResponse) Descriptor
deprecated
func (*FetchAssetResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchAssetResponse.ProtoReflect.Descriptor instead.
func (*FetchAssetResponse) ProtoMessage ¶
func (*FetchAssetResponse) ProtoMessage()
func (*FetchAssetResponse) ProtoReflect ¶
func (x *FetchAssetResponse) ProtoReflect() protoreflect.Message
func (*FetchAssetResponse) Reset ¶
func (x *FetchAssetResponse) Reset()
func (*FetchAssetResponse) String ¶
func (x *FetchAssetResponse) String() string
type FetchSnapshotRequest ¶
type FetchSnapshotRequest struct {
// The snapshot to read, e.g. gs://<bucket>/<prefix>.
SnapshotUri string `protobuf:"bytes,1,opt,name=snapshot_uri,json=snapshotUri,proto3" json:"snapshot_uri,omitempty"`
// The JWT of the actor that owns the snapshot, for plugins that authorize
// storage access per actor. Substrate does not set it yet, so it is
// currently always empty.
ActorJwt string `protobuf:"bytes,2,opt,name=actor_jwt,json=actorJwt,proto3" json:"actor_jwt,omitempty"`
// Full local path of the directory the files are written into. It must
// exist.
WritePath string `protobuf:"bytes,3,opt,name=write_path,json=writePath,proto3" json:"write_path,omitempty"`
// Base names of the files to download. Required.
Files []string `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
// contains filtered or unexported fields
}
FetchSnapshotRequest asks the plugin to download snapshot files.
func (*FetchSnapshotRequest) Descriptor
deprecated
func (*FetchSnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchSnapshotRequest.ProtoReflect.Descriptor instead.
func (*FetchSnapshotRequest) GetActorJwt ¶
func (x *FetchSnapshotRequest) GetActorJwt() string
func (*FetchSnapshotRequest) GetFiles ¶
func (x *FetchSnapshotRequest) GetFiles() []string
func (*FetchSnapshotRequest) GetSnapshotUri ¶
func (x *FetchSnapshotRequest) GetSnapshotUri() string
func (*FetchSnapshotRequest) GetWritePath ¶
func (x *FetchSnapshotRequest) GetWritePath() string
func (*FetchSnapshotRequest) ProtoMessage ¶
func (*FetchSnapshotRequest) ProtoMessage()
func (*FetchSnapshotRequest) ProtoReflect ¶
func (x *FetchSnapshotRequest) ProtoReflect() protoreflect.Message
func (*FetchSnapshotRequest) Reset ¶
func (x *FetchSnapshotRequest) Reset()
func (*FetchSnapshotRequest) String ¶
func (x *FetchSnapshotRequest) String() string
type FetchSnapshotResponse ¶
type FetchSnapshotResponse struct {
// contains filtered or unexported fields
}
func (*FetchSnapshotResponse) Descriptor
deprecated
func (*FetchSnapshotResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchSnapshotResponse.ProtoReflect.Descriptor instead.
func (*FetchSnapshotResponse) ProtoMessage ¶
func (*FetchSnapshotResponse) ProtoMessage()
func (*FetchSnapshotResponse) ProtoReflect ¶
func (x *FetchSnapshotResponse) ProtoReflect() protoreflect.Message
func (*FetchSnapshotResponse) Reset ¶
func (x *FetchSnapshotResponse) Reset()
func (*FetchSnapshotResponse) String ¶
func (x *FetchSnapshotResponse) String() string
type NodeProviderClient ¶
type NodeProviderClient interface {
// FetchSnapshot downloads the named files of a snapshot into write_path.
// It returns NOT_FOUND if any requested file is absent from the snapshot.
// A plugin that authorizes per actor returns PERMISSION_DENIED if actor_jwt
// does not grant read access to snapshot_uri.
FetchSnapshot(ctx context.Context, in *FetchSnapshotRequest, opts ...grpc.CallOption) (*FetchSnapshotResponse, error)
// UploadSnapshot uploads the named files from local_path into a snapshot.
// It returns success only once every file is durably stored. On failure,
// files already stored may remain, and the caller can remove them with
// ControlProvider.CleanupSnapshot. A plugin that authorizes per actor returns
// PERMISSION_DENIED if actor_jwt does not grant write access to snapshot_uri.
UploadSnapshot(ctx context.Context, in *UploadSnapshotRequest, opts ...grpc.CallOption) (*UploadSnapshotResponse, error)
}
NodeProviderClient is the client API for NodeProvider 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.
NodeProvider is the plugin API an object storage platform implements on every node. atelet calls it to move actor snapshots between the node and the platform's object storage. How the platform stores them (object names, compression) is private to the plugin. The only requirement is that FetchSnapshot returns the bytes UploadSnapshot was given. Substrate stores no checksums; verifying integrity is up to the plugin.
Callers name every file they want moved. A snapshot's file list lives in its manifest, which the caller fetches first by name. The caller also owns commit ordering: it uploads the data files, and only after that call succeeds does it upload the manifest in a separate call, so a reader that finds the manifest can rely on every file it lists.
Every RPC is idempotent: a retry overwrites whatever an earlier attempt stored or wrote.
func NewNodeProviderClient ¶
func NewNodeProviderClient(cc grpc.ClientConnInterface) NodeProviderClient
type NodeProviderServer ¶
type NodeProviderServer interface {
// FetchSnapshot downloads the named files of a snapshot into write_path.
// It returns NOT_FOUND if any requested file is absent from the snapshot.
// A plugin that authorizes per actor returns PERMISSION_DENIED if actor_jwt
// does not grant read access to snapshot_uri.
FetchSnapshot(context.Context, *FetchSnapshotRequest) (*FetchSnapshotResponse, error)
// UploadSnapshot uploads the named files from local_path into a snapshot.
// It returns success only once every file is durably stored. On failure,
// files already stored may remain, and the caller can remove them with
// ControlProvider.CleanupSnapshot. A plugin that authorizes per actor returns
// PERMISSION_DENIED if actor_jwt does not grant write access to snapshot_uri.
UploadSnapshot(context.Context, *UploadSnapshotRequest) (*UploadSnapshotResponse, error)
// contains filtered or unexported methods
}
NodeProviderServer is the server API for NodeProvider service. All implementations must embed UnimplementedNodeProviderServer for forward compatibility.
NodeProvider is the plugin API an object storage platform implements on every node. atelet calls it to move actor snapshots between the node and the platform's object storage. How the platform stores them (object names, compression) is private to the plugin. The only requirement is that FetchSnapshot returns the bytes UploadSnapshot was given. Substrate stores no checksums; verifying integrity is up to the plugin.
Callers name every file they want moved. A snapshot's file list lives in its manifest, which the caller fetches first by name. The caller also owns commit ordering: it uploads the data files, and only after that call succeeds does it upload the manifest in a separate call, so a reader that finds the manifest can rely on every file it lists.
Every RPC is idempotent: a retry overwrites whatever an earlier attempt stored or wrote.
type UnimplementedAssetProviderServer ¶
type UnimplementedAssetProviderServer struct{}
UnimplementedAssetProviderServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAssetProviderServer) FetchAsset ¶
func (UnimplementedAssetProviderServer) FetchAsset(context.Context, *FetchAssetRequest) (*FetchAssetResponse, error)
type UnimplementedControlProviderServer ¶
type UnimplementedControlProviderServer struct{}
UnimplementedControlProviderServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedControlProviderServer) CleanupSnapshot ¶
func (UnimplementedControlProviderServer) CleanupSnapshot(context.Context, *CleanupSnapshotRequest) (*CleanupSnapshotResponse, error)
func (UnimplementedControlProviderServer) CopySnapshot ¶
func (UnimplementedControlProviderServer) CopySnapshot(context.Context, *CopySnapshotRequest) (*CopySnapshotResponse, error)
type UnimplementedNodeProviderServer ¶
type UnimplementedNodeProviderServer struct{}
UnimplementedNodeProviderServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNodeProviderServer) FetchSnapshot ¶
func (UnimplementedNodeProviderServer) FetchSnapshot(context.Context, *FetchSnapshotRequest) (*FetchSnapshotResponse, error)
func (UnimplementedNodeProviderServer) UploadSnapshot ¶
func (UnimplementedNodeProviderServer) UploadSnapshot(context.Context, *UploadSnapshotRequest) (*UploadSnapshotResponse, error)
type UnsafeAssetProviderServer ¶
type UnsafeAssetProviderServer interface {
// contains filtered or unexported methods
}
UnsafeAssetProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssetProviderServer will result in compilation errors.
type UnsafeControlProviderServer ¶
type UnsafeControlProviderServer interface {
// contains filtered or unexported methods
}
UnsafeControlProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ControlProviderServer will result in compilation errors.
type UnsafeNodeProviderServer ¶
type UnsafeNodeProviderServer interface {
// contains filtered or unexported methods
}
UnsafeNodeProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeProviderServer will result in compilation errors.
type UploadSnapshotRequest ¶
type UploadSnapshotRequest struct {
// The snapshot to write, e.g. gs://<bucket>/<prefix>.
SnapshotUri string `protobuf:"bytes,1,opt,name=snapshot_uri,json=snapshotUri,proto3" json:"snapshot_uri,omitempty"`
// The JWT of the actor that owns the snapshot, for plugins that authorize
// storage access per actor. Substrate does not set it yet, so it is
// currently always empty.
ActorJwt string `protobuf:"bytes,2,opt,name=actor_jwt,json=actorJwt,proto3" json:"actor_jwt,omitempty"`
// Full local path of the directory the files are read from.
LocalPath string `protobuf:"bytes,3,opt,name=local_path,json=localPath,proto3" json:"local_path,omitempty"`
// Base names of the files to upload. Required.
Files []string `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
// contains filtered or unexported fields
}
UploadSnapshotRequest asks the plugin to upload snapshot files.
func (*UploadSnapshotRequest) Descriptor
deprecated
func (*UploadSnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadSnapshotRequest.ProtoReflect.Descriptor instead.
func (*UploadSnapshotRequest) GetActorJwt ¶
func (x *UploadSnapshotRequest) GetActorJwt() string
func (*UploadSnapshotRequest) GetFiles ¶
func (x *UploadSnapshotRequest) GetFiles() []string
func (*UploadSnapshotRequest) GetLocalPath ¶
func (x *UploadSnapshotRequest) GetLocalPath() string
func (*UploadSnapshotRequest) GetSnapshotUri ¶
func (x *UploadSnapshotRequest) GetSnapshotUri() string
func (*UploadSnapshotRequest) ProtoMessage ¶
func (*UploadSnapshotRequest) ProtoMessage()
func (*UploadSnapshotRequest) ProtoReflect ¶
func (x *UploadSnapshotRequest) ProtoReflect() protoreflect.Message
func (*UploadSnapshotRequest) Reset ¶
func (x *UploadSnapshotRequest) Reset()
func (*UploadSnapshotRequest) String ¶
func (x *UploadSnapshotRequest) String() string
type UploadSnapshotResponse ¶
type UploadSnapshotResponse struct {
// contains filtered or unexported fields
}
func (*UploadSnapshotResponse) Descriptor
deprecated
func (*UploadSnapshotResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadSnapshotResponse.ProtoReflect.Descriptor instead.
func (*UploadSnapshotResponse) ProtoMessage ¶
func (*UploadSnapshotResponse) ProtoMessage()
func (*UploadSnapshotResponse) ProtoReflect ¶
func (x *UploadSnapshotResponse) ProtoReflect() protoreflect.Message
func (*UploadSnapshotResponse) Reset ¶
func (x *UploadSnapshotResponse) Reset()
func (*UploadSnapshotResponse) String ¶
func (x *UploadSnapshotResponse) String() string