mirror of https://github.com/dragonflyoss/api.git
1067 lines
42 KiB
Go
1067 lines
42 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.6
|
|
// source: pkg/apis/scheduler/v2/scheduler.proto
|
|
|
|
package scheduler
|
|
|
|
import (
|
|
context "context"
|
|
v2 "d7y.io/api/v2/pkg/apis/common/v2"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// SchedulerClient is the client API for Scheduler 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.
|
|
type SchedulerClient interface {
|
|
// AnnouncePeer announces peer to scheduler.
|
|
AnnouncePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePeerClient, error)
|
|
// Checks information of peer.
|
|
StatPeer(ctx context.Context, in *StatPeerRequest, opts ...grpc.CallOption) (*v2.Peer, error)
|
|
// DeletePeer releases peer in scheduler.
|
|
DeletePeer(ctx context.Context, in *DeletePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// Checks information of task.
|
|
StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*v2.Task, error)
|
|
// DeleteTask releases task in scheduler.
|
|
DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// AnnounceHost announces host to scheduler.
|
|
AnnounceHost(ctx context.Context, in *AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ListHosts lists hosts in scheduler.
|
|
ListHosts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListHostsResponse, error)
|
|
// DeleteHost releases host in scheduler.
|
|
DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// AnnounceCachePeer announces cache peer to scheduler.
|
|
AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnounceCachePeerClient, error)
|
|
// Checks information of cache peer.
|
|
StatCachePeer(ctx context.Context, in *StatCachePeerRequest, opts ...grpc.CallOption) (*v2.CachePeer, error)
|
|
// DeleteCachePeer releases cache peer in scheduler.
|
|
DeleteCachePeer(ctx context.Context, in *DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// Checks information of cache task.
|
|
StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error)
|
|
// DeleteCacheTask releases cache task in scheduler.
|
|
DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
|
|
AnnouncePersistentCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePersistentCachePeerClient, error)
|
|
// Checks information of persistent cache peer.
|
|
StatPersistentCachePeer(ctx context.Context, in *StatPersistentCachePeerRequest, opts ...grpc.CallOption) (*v2.PersistentCachePeer, error)
|
|
// DeletePersistentCachePeer releases persistent cache peer in scheduler.
|
|
DeletePersistentCachePeer(ctx context.Context, in *DeletePersistentCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// UploadPersistentCacheTaskStarted uploads persistent cache task started to scheduler.
|
|
UploadPersistentCacheTaskStarted(ctx context.Context, in *UploadPersistentCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// UploadPersistentCacheTaskFinished uploads persistent cache task finished to scheduler.
|
|
UploadPersistentCacheTaskFinished(ctx context.Context, in *UploadPersistentCacheTaskFinishedRequest, opts ...grpc.CallOption) (*v2.PersistentCacheTask, error)
|
|
// UploadPersistentCacheTaskFailed uploads persistent cache task failed to scheduler.
|
|
UploadPersistentCacheTaskFailed(ctx context.Context, in *UploadPersistentCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// Checks information of persistent cache task.
|
|
StatPersistentCacheTask(ctx context.Context, in *StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*v2.PersistentCacheTask, error)
|
|
// DeletePersistentCacheTask releases persistent cache task in scheduler.
|
|
DeletePersistentCacheTask(ctx context.Context, in *DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
|
|
//
|
|
// This is a blocking call. The RPC will not return until the server has completed the
|
|
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
|
|
//
|
|
// After this call successfully returns, a scheduler on the server begins the actual
|
|
// preheating process, instructing peers to download the layers in the background.
|
|
//
|
|
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
|
|
// and the asynchronous download task has been scheduled.
|
|
PreheatImage(ctx context.Context, in *PreheatImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// StatImage provides detailed status for a container image's distribution in peers.
|
|
//
|
|
// This is a blocking call that first resolves the image manifest and then queries
|
|
// all peers to collect the image's download state across the network.
|
|
// The response includes both layer information and the status on each peer.
|
|
StatImage(ctx context.Context, in *StatImageRequest, opts ...grpc.CallOption) (*StatImageResponse, error)
|
|
}
|
|
|
|
type schedulerClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient {
|
|
return &schedulerClient{cc}
|
|
}
|
|
|
|
func (c *schedulerClient) AnnouncePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePeerClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[0], "/scheduler.v2.Scheduler/AnnouncePeer", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &schedulerAnnouncePeerClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Scheduler_AnnouncePeerClient interface {
|
|
Send(*AnnouncePeerRequest) error
|
|
Recv() (*AnnouncePeerResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type schedulerAnnouncePeerClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *schedulerAnnouncePeerClient) Send(m *AnnouncePeerRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnouncePeerClient) Recv() (*AnnouncePeerResponse, error) {
|
|
m := new(AnnouncePeerResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatPeer(ctx context.Context, in *StatPeerRequest, opts ...grpc.CallOption) (*v2.Peer, error) {
|
|
out := new(v2.Peer)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatPeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeletePeer(ctx context.Context, in *DeletePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeletePeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*v2.Task, error) {
|
|
out := new(v2.Task)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) AnnounceHost(ctx context.Context, in *AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/AnnounceHost", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) ListHosts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListHostsResponse, error) {
|
|
out := new(ListHostsResponse)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/ListHosts", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteHost", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnounceCachePeerClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1], "/scheduler.v2.Scheduler/AnnounceCachePeer", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &schedulerAnnounceCachePeerClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Scheduler_AnnounceCachePeerClient interface {
|
|
Send(*AnnounceCachePeerRequest) error
|
|
Recv() (*AnnounceCachePeerResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type schedulerAnnounceCachePeerClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *schedulerAnnounceCachePeerClient) Send(m *AnnounceCachePeerRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnounceCachePeerClient) Recv() (*AnnounceCachePeerResponse, error) {
|
|
m := new(AnnounceCachePeerResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatCachePeer(ctx context.Context, in *StatCachePeerRequest, opts ...grpc.CallOption) (*v2.CachePeer, error) {
|
|
out := new(v2.CachePeer)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatCachePeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeleteCachePeer(ctx context.Context, in *DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteCachePeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatCacheTask(ctx context.Context, in *StatCacheTaskRequest, opts ...grpc.CallOption) (*v2.CacheTask, error) {
|
|
out := new(v2.CacheTask)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatCacheTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeleteCacheTask(ctx context.Context, in *DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeleteCacheTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) AnnouncePersistentCachePeer(ctx context.Context, opts ...grpc.CallOption) (Scheduler_AnnouncePersistentCachePeerClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2], "/scheduler.v2.Scheduler/AnnouncePersistentCachePeer", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &schedulerAnnouncePersistentCachePeerClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Scheduler_AnnouncePersistentCachePeerClient interface {
|
|
Send(*AnnouncePersistentCachePeerRequest) error
|
|
Recv() (*AnnouncePersistentCachePeerResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type schedulerAnnouncePersistentCachePeerClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *schedulerAnnouncePersistentCachePeerClient) Send(m *AnnouncePersistentCachePeerRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnouncePersistentCachePeerClient) Recv() (*AnnouncePersistentCachePeerResponse, error) {
|
|
m := new(AnnouncePersistentCachePeerResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatPersistentCachePeer(ctx context.Context, in *StatPersistentCachePeerRequest, opts ...grpc.CallOption) (*v2.PersistentCachePeer, error) {
|
|
out := new(v2.PersistentCachePeer)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatPersistentCachePeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeletePersistentCachePeer(ctx context.Context, in *DeletePersistentCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeletePersistentCachePeer", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) UploadPersistentCacheTaskStarted(ctx context.Context, in *UploadPersistentCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadPersistentCacheTaskStarted", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) UploadPersistentCacheTaskFinished(ctx context.Context, in *UploadPersistentCacheTaskFinishedRequest, opts ...grpc.CallOption) (*v2.PersistentCacheTask, error) {
|
|
out := new(v2.PersistentCacheTask)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadPersistentCacheTaskFinished", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) UploadPersistentCacheTaskFailed(ctx context.Context, in *UploadPersistentCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/UploadPersistentCacheTaskFailed", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatPersistentCacheTask(ctx context.Context, in *StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*v2.PersistentCacheTask, error) {
|
|
out := new(v2.PersistentCacheTask)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatPersistentCacheTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) DeletePersistentCacheTask(ctx context.Context, in *DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/DeletePersistentCacheTask", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) PreheatImage(ctx context.Context, in *PreheatImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/PreheatImage", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *schedulerClient) StatImage(ctx context.Context, in *StatImageRequest, opts ...grpc.CallOption) (*StatImageResponse, error) {
|
|
out := new(StatImageResponse)
|
|
err := c.cc.Invoke(ctx, "/scheduler.v2.Scheduler/StatImage", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SchedulerServer is the server API for Scheduler service.
|
|
// All implementations should embed UnimplementedSchedulerServer
|
|
// for forward compatibility
|
|
type SchedulerServer interface {
|
|
// AnnouncePeer announces peer to scheduler.
|
|
AnnouncePeer(Scheduler_AnnouncePeerServer) error
|
|
// Checks information of peer.
|
|
StatPeer(context.Context, *StatPeerRequest) (*v2.Peer, error)
|
|
// DeletePeer releases peer in scheduler.
|
|
DeletePeer(context.Context, *DeletePeerRequest) (*emptypb.Empty, error)
|
|
// Checks information of task.
|
|
StatTask(context.Context, *StatTaskRequest) (*v2.Task, error)
|
|
// DeleteTask releases task in scheduler.
|
|
DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error)
|
|
// AnnounceHost announces host to scheduler.
|
|
AnnounceHost(context.Context, *AnnounceHostRequest) (*emptypb.Empty, error)
|
|
// ListHosts lists hosts in scheduler.
|
|
ListHosts(context.Context, *emptypb.Empty) (*ListHostsResponse, error)
|
|
// DeleteHost releases host in scheduler.
|
|
DeleteHost(context.Context, *DeleteHostRequest) (*emptypb.Empty, error)
|
|
// AnnounceCachePeer announces cache peer to scheduler.
|
|
AnnounceCachePeer(Scheduler_AnnounceCachePeerServer) error
|
|
// Checks information of cache peer.
|
|
StatCachePeer(context.Context, *StatCachePeerRequest) (*v2.CachePeer, error)
|
|
// DeleteCachePeer releases cache peer in scheduler.
|
|
DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error)
|
|
// Checks information of cache task.
|
|
StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error)
|
|
// DeleteCacheTask releases cache task in scheduler.
|
|
DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error)
|
|
// AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
|
|
AnnouncePersistentCachePeer(Scheduler_AnnouncePersistentCachePeerServer) error
|
|
// Checks information of persistent cache peer.
|
|
StatPersistentCachePeer(context.Context, *StatPersistentCachePeerRequest) (*v2.PersistentCachePeer, error)
|
|
// DeletePersistentCachePeer releases persistent cache peer in scheduler.
|
|
DeletePersistentCachePeer(context.Context, *DeletePersistentCachePeerRequest) (*emptypb.Empty, error)
|
|
// UploadPersistentCacheTaskStarted uploads persistent cache task started to scheduler.
|
|
UploadPersistentCacheTaskStarted(context.Context, *UploadPersistentCacheTaskStartedRequest) (*emptypb.Empty, error)
|
|
// UploadPersistentCacheTaskFinished uploads persistent cache task finished to scheduler.
|
|
UploadPersistentCacheTaskFinished(context.Context, *UploadPersistentCacheTaskFinishedRequest) (*v2.PersistentCacheTask, error)
|
|
// UploadPersistentCacheTaskFailed uploads persistent cache task failed to scheduler.
|
|
UploadPersistentCacheTaskFailed(context.Context, *UploadPersistentCacheTaskFailedRequest) (*emptypb.Empty, error)
|
|
// Checks information of persistent cache task.
|
|
StatPersistentCacheTask(context.Context, *StatPersistentCacheTaskRequest) (*v2.PersistentCacheTask, error)
|
|
// DeletePersistentCacheTask releases persistent cache task in scheduler.
|
|
DeletePersistentCacheTask(context.Context, *DeletePersistentCacheTaskRequest) (*emptypb.Empty, error)
|
|
// PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.
|
|
//
|
|
// This is a blocking call. The RPC will not return until the server has completed the
|
|
// initial synchronous work: resolving the image manifest and preparing all layer URLs.
|
|
//
|
|
// After this call successfully returns, a scheduler on the server begins the actual
|
|
// preheating process, instructing peers to download the layers in the background.
|
|
//
|
|
// A successful response (google.protobuf.Empty) confirms that the preparation is complete
|
|
// and the asynchronous download task has been scheduled.
|
|
PreheatImage(context.Context, *PreheatImageRequest) (*emptypb.Empty, error)
|
|
// StatImage provides detailed status for a container image's distribution in peers.
|
|
//
|
|
// This is a blocking call that first resolves the image manifest and then queries
|
|
// all peers to collect the image's download state across the network.
|
|
// The response includes both layer information and the status on each peer.
|
|
StatImage(context.Context, *StatImageRequest) (*StatImageResponse, error)
|
|
}
|
|
|
|
// UnimplementedSchedulerServer should be embedded to have forward compatible implementations.
|
|
type UnimplementedSchedulerServer struct {
|
|
}
|
|
|
|
func (UnimplementedSchedulerServer) AnnouncePeer(Scheduler_AnnouncePeerServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method AnnouncePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatPeer(context.Context, *StatPeerRequest) (*v2.Peer, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeletePeer(context.Context, *DeletePeerRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatTask(context.Context, *StatTaskRequest) (*v2.Task, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) AnnounceHost(context.Context, *AnnounceHostRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AnnounceHost not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) ListHosts(context.Context, *emptypb.Empty) (*ListHostsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListHosts not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeleteHost(context.Context, *DeleteHostRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteHost not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) AnnounceCachePeer(Scheduler_AnnounceCachePeerServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method AnnounceCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatCachePeer(context.Context, *StatCachePeerRequest) (*v2.CachePeer, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeleteCachePeer(context.Context, *DeleteCachePeerRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatCacheTask(context.Context, *StatCacheTaskRequest) (*v2.CacheTask, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatCacheTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeleteCacheTask(context.Context, *DeleteCacheTaskRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteCacheTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) AnnouncePersistentCachePeer(Scheduler_AnnouncePersistentCachePeerServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method AnnouncePersistentCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatPersistentCachePeer(context.Context, *StatPersistentCachePeerRequest) (*v2.PersistentCachePeer, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPersistentCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeletePersistentCachePeer(context.Context, *DeletePersistentCachePeerRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePersistentCachePeer not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) UploadPersistentCacheTaskStarted(context.Context, *UploadPersistentCacheTaskStartedRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadPersistentCacheTaskStarted not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) UploadPersistentCacheTaskFinished(context.Context, *UploadPersistentCacheTaskFinishedRequest) (*v2.PersistentCacheTask, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadPersistentCacheTaskFinished not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) UploadPersistentCacheTaskFailed(context.Context, *UploadPersistentCacheTaskFailedRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadPersistentCacheTaskFailed not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatPersistentCacheTask(context.Context, *StatPersistentCacheTaskRequest) (*v2.PersistentCacheTask, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPersistentCacheTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) DeletePersistentCacheTask(context.Context, *DeletePersistentCacheTaskRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePersistentCacheTask not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) PreheatImage(context.Context, *PreheatImageRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PreheatImage not implemented")
|
|
}
|
|
func (UnimplementedSchedulerServer) StatImage(context.Context, *StatImageRequest) (*StatImageResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatImage not implemented")
|
|
}
|
|
|
|
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SchedulerServer will
|
|
// result in compilation errors.
|
|
type UnsafeSchedulerServer interface {
|
|
mustEmbedUnimplementedSchedulerServer()
|
|
}
|
|
|
|
func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer) {
|
|
s.RegisterService(&Scheduler_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Scheduler_AnnouncePeer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SchedulerServer).AnnouncePeer(&schedulerAnnouncePeerServer{stream})
|
|
}
|
|
|
|
type Scheduler_AnnouncePeerServer interface {
|
|
Send(*AnnouncePeerResponse) error
|
|
Recv() (*AnnouncePeerRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type schedulerAnnouncePeerServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *schedulerAnnouncePeerServer) Send(m *AnnouncePeerResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnouncePeerServer) Recv() (*AnnouncePeerRequest, error) {
|
|
m := new(AnnouncePeerRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _Scheduler_StatPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatPeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatPeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatPeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatPeer(ctx, req.(*StatPeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeletePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeletePeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeletePeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeletePeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeletePeer(ctx, req.(*DeletePeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_StatTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatTask(ctx, req.(*StatTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeleteTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeleteTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeleteTask(ctx, req.(*DeleteTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_AnnounceHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AnnounceHostRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).AnnounceHost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/AnnounceHost",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).AnnounceHost(ctx, req.(*AnnounceHostRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_ListHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).ListHosts(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/ListHosts",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).ListHosts(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeleteHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteHostRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeleteHost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeleteHost",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeleteHost(ctx, req.(*DeleteHostRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_AnnounceCachePeer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SchedulerServer).AnnounceCachePeer(&schedulerAnnounceCachePeerServer{stream})
|
|
}
|
|
|
|
type Scheduler_AnnounceCachePeerServer interface {
|
|
Send(*AnnounceCachePeerResponse) error
|
|
Recv() (*AnnounceCachePeerRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type schedulerAnnounceCachePeerServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *schedulerAnnounceCachePeerServer) Send(m *AnnounceCachePeerResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnounceCachePeerServer) Recv() (*AnnounceCachePeerRequest, error) {
|
|
m := new(AnnounceCachePeerRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _Scheduler_StatCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatCachePeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatCachePeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatCachePeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatCachePeer(ctx, req.(*StatCachePeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeleteCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteCachePeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeleteCachePeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeleteCachePeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeleteCachePeer(ctx, req.(*DeleteCachePeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_StatCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatCacheTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatCacheTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatCacheTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatCacheTask(ctx, req.(*StatCacheTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeleteCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteCacheTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeleteCacheTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeleteCacheTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeleteCacheTask(ctx, req.(*DeleteCacheTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_AnnouncePersistentCachePeer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SchedulerServer).AnnouncePersistentCachePeer(&schedulerAnnouncePersistentCachePeerServer{stream})
|
|
}
|
|
|
|
type Scheduler_AnnouncePersistentCachePeerServer interface {
|
|
Send(*AnnouncePersistentCachePeerResponse) error
|
|
Recv() (*AnnouncePersistentCachePeerRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type schedulerAnnouncePersistentCachePeerServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *schedulerAnnouncePersistentCachePeerServer) Send(m *AnnouncePersistentCachePeerResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *schedulerAnnouncePersistentCachePeerServer) Recv() (*AnnouncePersistentCachePeerRequest, error) {
|
|
m := new(AnnouncePersistentCachePeerRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _Scheduler_StatPersistentCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatPersistentCachePeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatPersistentCachePeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatPersistentCachePeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatPersistentCachePeer(ctx, req.(*StatPersistentCachePeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeletePersistentCachePeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeletePersistentCachePeerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeletePersistentCachePeer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeletePersistentCachePeer",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeletePersistentCachePeer(ctx, req.(*DeletePersistentCachePeerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_UploadPersistentCacheTaskStarted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadPersistentCacheTaskStartedRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskStarted(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/UploadPersistentCacheTaskStarted",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskStarted(ctx, req.(*UploadPersistentCacheTaskStartedRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_UploadPersistentCacheTaskFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadPersistentCacheTaskFinishedRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskFinished(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/UploadPersistentCacheTaskFinished",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskFinished(ctx, req.(*UploadPersistentCacheTaskFinishedRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_UploadPersistentCacheTaskFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadPersistentCacheTaskFailedRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskFailed(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/UploadPersistentCacheTaskFailed",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).UploadPersistentCacheTaskFailed(ctx, req.(*UploadPersistentCacheTaskFailedRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_StatPersistentCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatPersistentCacheTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatPersistentCacheTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatPersistentCacheTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatPersistentCacheTask(ctx, req.(*StatPersistentCacheTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_DeletePersistentCacheTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeletePersistentCacheTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).DeletePersistentCacheTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/DeletePersistentCacheTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).DeletePersistentCacheTask(ctx, req.(*DeletePersistentCacheTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_PreheatImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PreheatImageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).PreheatImage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/PreheatImage",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).PreheatImage(ctx, req.(*PreheatImageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Scheduler_StatImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatImageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SchedulerServer).StatImage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/scheduler.v2.Scheduler/StatImage",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SchedulerServer).StatImage(ctx, req.(*StatImageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Scheduler_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "scheduler.v2.Scheduler",
|
|
HandlerType: (*SchedulerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "StatPeer",
|
|
Handler: _Scheduler_StatPeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePeer",
|
|
Handler: _Scheduler_DeletePeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatTask",
|
|
Handler: _Scheduler_StatTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteTask",
|
|
Handler: _Scheduler_DeleteTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "AnnounceHost",
|
|
Handler: _Scheduler_AnnounceHost_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListHosts",
|
|
Handler: _Scheduler_ListHosts_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteHost",
|
|
Handler: _Scheduler_DeleteHost_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatCachePeer",
|
|
Handler: _Scheduler_StatCachePeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteCachePeer",
|
|
Handler: _Scheduler_DeleteCachePeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatCacheTask",
|
|
Handler: _Scheduler_StatCacheTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteCacheTask",
|
|
Handler: _Scheduler_DeleteCacheTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatPersistentCachePeer",
|
|
Handler: _Scheduler_StatPersistentCachePeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePersistentCachePeer",
|
|
Handler: _Scheduler_DeletePersistentCachePeer_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadPersistentCacheTaskStarted",
|
|
Handler: _Scheduler_UploadPersistentCacheTaskStarted_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadPersistentCacheTaskFinished",
|
|
Handler: _Scheduler_UploadPersistentCacheTaskFinished_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadPersistentCacheTaskFailed",
|
|
Handler: _Scheduler_UploadPersistentCacheTaskFailed_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatPersistentCacheTask",
|
|
Handler: _Scheduler_StatPersistentCacheTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePersistentCacheTask",
|
|
Handler: _Scheduler_DeletePersistentCacheTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "PreheatImage",
|
|
Handler: _Scheduler_PreheatImage_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatImage",
|
|
Handler: _Scheduler_StatImage_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "AnnouncePeer",
|
|
Handler: _Scheduler_AnnouncePeer_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "AnnounceCachePeer",
|
|
Handler: _Scheduler_AnnounceCachePeer_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "AnnouncePersistentCachePeer",
|
|
Handler: _Scheduler_AnnouncePersistentCachePeer_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "pkg/apis/scheduler/v2/scheduler.proto",
|
|
}
|