yao/tai/volume/pb/volume_grpc.pb.go
Max 82bb44cbda feat(workspace): add root directory retrieval for workspaces
- Implemented a new endpoint to retrieve the absolute path of a workspace's root directory.
- Enhanced the workspace interface with a GetRoot method to facilitate this functionality.
- Updated the workspace manager to utilize the new method for improved path resolution.

Made-with: Cursor
2026-03-13 18:25:14 +08:00

827 lines
32 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v4.25.0
// source: tai/volume/pb/volume.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Volume_SyncPush_FullMethodName = "/volume.Volume/SyncPush"
Volume_SyncPull_FullMethodName = "/volume.Volume/SyncPull"
Volume_ReadFile_FullMethodName = "/volume.Volume/ReadFile"
Volume_WriteFile_FullMethodName = "/volume.Volume/WriteFile"
Volume_Stat_FullMethodName = "/volume.Volume/Stat"
Volume_ListDir_FullMethodName = "/volume.Volume/ListDir"
Volume_Remove_FullMethodName = "/volume.Volume/Remove"
Volume_Rename_FullMethodName = "/volume.Volume/Rename"
Volume_MkdirAll_FullMethodName = "/volume.Volume/MkdirAll"
Volume_Abs_FullMethodName = "/volume.Volume/Abs"
Volume_Copy_FullMethodName = "/volume.Volume/Copy"
Volume_Zip_FullMethodName = "/volume.Volume/Zip"
Volume_Unzip_FullMethodName = "/volume.Volume/Unzip"
Volume_Gzip_FullMethodName = "/volume.Volume/Gzip"
Volume_Gunzip_FullMethodName = "/volume.Volume/Gunzip"
Volume_Tar_FullMethodName = "/volume.Volume/Tar"
Volume_Untar_FullMethodName = "/volume.Volume/Untar"
Volume_Tgz_FullMethodName = "/volume.Volume/Tgz"
Volume_Untgz_FullMethodName = "/volume.Volume/Untgz"
)
// VolumeClient is the client API for Volume 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.
//
// Volume provides bulk file synchronization, real-time filesystem I/O,
// and archive/compression operations.
// Shares gRPC port :19100 with Yao Gateway.
type VolumeClient interface {
// SyncPush: Yao sends code to Tai (before container start).
// Bidirectional stream:
// 1. Yao sends SyncManifest (file list with mtime+size)
// 2. Tai diffs, replies with SyncDiff (which files to send)
// 3. Yao sends only needed FileChunks
// 4. Tai replies with SyncResult
SyncPush(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SyncMessage, SyncMessage], error)
// SyncPull: Yao pulls changes from Tai (after container stop).
// Yao sends its file manifest; Tai diffs internally and streams back changed files.
SyncPull(ctx context.Context, in *SyncManifest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncMessage], error)
ReadFile(ctx context.Context, in *FSReadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FSDataChunk], error)
WriteFile(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[FSWriteChunk, FSWriteResponse], error)
Stat(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FileInfo, error)
ListDir(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSListResponse, error)
Remove(ctx context.Context, in *FSRemoveRequest, opts ...grpc.CallOption) (*FSOpResponse, error)
Rename(ctx context.Context, in *FSRenameRequest, opts ...grpc.CallOption) (*FSOpResponse, error)
MkdirAll(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSOpResponse, error)
// Abs: resolve a session-relative path to its absolute path on the host.
Abs(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSAbsResponse, error)
// Copy: copy src to dst within the same workspace (server-side when remote).
Copy(ctx context.Context, in *FSCopyRequest, opts ...grpc.CallOption) (*SyncResult, error)
Zip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Unzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Gzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Gunzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Tar(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Untar(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Tgz(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
Untgz(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
}
type volumeClient struct {
cc grpc.ClientConnInterface
}
func NewVolumeClient(cc grpc.ClientConnInterface) VolumeClient {
return &volumeClient{cc}
}
func (c *volumeClient) SyncPush(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SyncMessage, SyncMessage], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Volume_ServiceDesc.Streams[0], Volume_SyncPush_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[SyncMessage, SyncMessage]{ClientStream: stream}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_SyncPushClient = grpc.BidiStreamingClient[SyncMessage, SyncMessage]
func (c *volumeClient) SyncPull(ctx context.Context, in *SyncManifest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncMessage], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Volume_ServiceDesc.Streams[1], Volume_SyncPull_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[SyncManifest, SyncMessage]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_SyncPullClient = grpc.ServerStreamingClient[SyncMessage]
func (c *volumeClient) ReadFile(ctx context.Context, in *FSReadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FSDataChunk], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Volume_ServiceDesc.Streams[2], Volume_ReadFile_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[FSReadRequest, FSDataChunk]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_ReadFileClient = grpc.ServerStreamingClient[FSDataChunk]
func (c *volumeClient) WriteFile(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[FSWriteChunk, FSWriteResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Volume_ServiceDesc.Streams[3], Volume_WriteFile_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[FSWriteChunk, FSWriteResponse]{ClientStream: stream}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_WriteFileClient = grpc.ClientStreamingClient[FSWriteChunk, FSWriteResponse]
func (c *volumeClient) Stat(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FileInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FileInfo)
err := c.cc.Invoke(ctx, Volume_Stat_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) ListDir(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSListResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FSListResponse)
err := c.cc.Invoke(ctx, Volume_ListDir_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Remove(ctx context.Context, in *FSRemoveRequest, opts ...grpc.CallOption) (*FSOpResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FSOpResponse)
err := c.cc.Invoke(ctx, Volume_Remove_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Rename(ctx context.Context, in *FSRenameRequest, opts ...grpc.CallOption) (*FSOpResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FSOpResponse)
err := c.cc.Invoke(ctx, Volume_Rename_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) MkdirAll(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSOpResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FSOpResponse)
err := c.cc.Invoke(ctx, Volume_MkdirAll_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Abs(ctx context.Context, in *FSRequest, opts ...grpc.CallOption) (*FSAbsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FSAbsResponse)
err := c.cc.Invoke(ctx, Volume_Abs_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Copy(ctx context.Context, in *FSCopyRequest, opts ...grpc.CallOption) (*SyncResult, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SyncResult)
err := c.cc.Invoke(ctx, Volume_Copy_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Zip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Zip_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Unzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Unzip_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Gzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Gzip_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Gunzip(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Gunzip_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Tar(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Tar_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Untar(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Untar_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Tgz(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Tgz_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *volumeClient) Untgz(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ArchiveResponse)
err := c.cc.Invoke(ctx, Volume_Untgz_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// VolumeServer is the server API for Volume service.
// All implementations must embed UnimplementedVolumeServer
// for forward compatibility.
//
// Volume provides bulk file synchronization, real-time filesystem I/O,
// and archive/compression operations.
// Shares gRPC port :19100 with Yao Gateway.
type VolumeServer interface {
// SyncPush: Yao sends code to Tai (before container start).
// Bidirectional stream:
// 1. Yao sends SyncManifest (file list with mtime+size)
// 2. Tai diffs, replies with SyncDiff (which files to send)
// 3. Yao sends only needed FileChunks
// 4. Tai replies with SyncResult
SyncPush(grpc.BidiStreamingServer[SyncMessage, SyncMessage]) error
// SyncPull: Yao pulls changes from Tai (after container stop).
// Yao sends its file manifest; Tai diffs internally and streams back changed files.
SyncPull(*SyncManifest, grpc.ServerStreamingServer[SyncMessage]) error
ReadFile(*FSReadRequest, grpc.ServerStreamingServer[FSDataChunk]) error
WriteFile(grpc.ClientStreamingServer[FSWriteChunk, FSWriteResponse]) error
Stat(context.Context, *FSRequest) (*FileInfo, error)
ListDir(context.Context, *FSRequest) (*FSListResponse, error)
Remove(context.Context, *FSRemoveRequest) (*FSOpResponse, error)
Rename(context.Context, *FSRenameRequest) (*FSOpResponse, error)
MkdirAll(context.Context, *FSRequest) (*FSOpResponse, error)
// Abs: resolve a session-relative path to its absolute path on the host.
Abs(context.Context, *FSRequest) (*FSAbsResponse, error)
// Copy: copy src to dst within the same workspace (server-side when remote).
Copy(context.Context, *FSCopyRequest) (*SyncResult, error)
Zip(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Unzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Gzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Gunzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Tar(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Untar(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Tgz(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
Untgz(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
mustEmbedUnimplementedVolumeServer()
}
// UnimplementedVolumeServer 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.
type UnimplementedVolumeServer struct{}
func (UnimplementedVolumeServer) SyncPush(grpc.BidiStreamingServer[SyncMessage, SyncMessage]) error {
return status.Error(codes.Unimplemented, "method SyncPush not implemented")
}
func (UnimplementedVolumeServer) SyncPull(*SyncManifest, grpc.ServerStreamingServer[SyncMessage]) error {
return status.Error(codes.Unimplemented, "method SyncPull not implemented")
}
func (UnimplementedVolumeServer) ReadFile(*FSReadRequest, grpc.ServerStreamingServer[FSDataChunk]) error {
return status.Error(codes.Unimplemented, "method ReadFile not implemented")
}
func (UnimplementedVolumeServer) WriteFile(grpc.ClientStreamingServer[FSWriteChunk, FSWriteResponse]) error {
return status.Error(codes.Unimplemented, "method WriteFile not implemented")
}
func (UnimplementedVolumeServer) Stat(context.Context, *FSRequest) (*FileInfo, error) {
return nil, status.Error(codes.Unimplemented, "method Stat not implemented")
}
func (UnimplementedVolumeServer) ListDir(context.Context, *FSRequest) (*FSListResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListDir not implemented")
}
func (UnimplementedVolumeServer) Remove(context.Context, *FSRemoveRequest) (*FSOpResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Remove not implemented")
}
func (UnimplementedVolumeServer) Rename(context.Context, *FSRenameRequest) (*FSOpResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Rename not implemented")
}
func (UnimplementedVolumeServer) MkdirAll(context.Context, *FSRequest) (*FSOpResponse, error) {
return nil, status.Error(codes.Unimplemented, "method MkdirAll not implemented")
}
func (UnimplementedVolumeServer) Abs(context.Context, *FSRequest) (*FSAbsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Abs not implemented")
}
func (UnimplementedVolumeServer) Copy(context.Context, *FSCopyRequest) (*SyncResult, error) {
return nil, status.Error(codes.Unimplemented, "method Copy not implemented")
}
func (UnimplementedVolumeServer) Zip(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Zip not implemented")
}
func (UnimplementedVolumeServer) Unzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Unzip not implemented")
}
func (UnimplementedVolumeServer) Gzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Gzip not implemented")
}
func (UnimplementedVolumeServer) Gunzip(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Gunzip not implemented")
}
func (UnimplementedVolumeServer) Tar(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Tar not implemented")
}
func (UnimplementedVolumeServer) Untar(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Untar not implemented")
}
func (UnimplementedVolumeServer) Tgz(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Tgz not implemented")
}
func (UnimplementedVolumeServer) Untgz(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Untgz not implemented")
}
func (UnimplementedVolumeServer) mustEmbedUnimplementedVolumeServer() {}
func (UnimplementedVolumeServer) testEmbeddedByValue() {}
// UnsafeVolumeServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VolumeServer will
// result in compilation errors.
type UnsafeVolumeServer interface {
mustEmbedUnimplementedVolumeServer()
}
func RegisterVolumeServer(s grpc.ServiceRegistrar, srv VolumeServer) {
// If the following call panics, it indicates UnimplementedVolumeServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Volume_ServiceDesc, srv)
}
func _Volume_SyncPush_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(VolumeServer).SyncPush(&grpc.GenericServerStream[SyncMessage, SyncMessage]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_SyncPushServer = grpc.BidiStreamingServer[SyncMessage, SyncMessage]
func _Volume_SyncPull_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SyncManifest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(VolumeServer).SyncPull(m, &grpc.GenericServerStream[SyncManifest, SyncMessage]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_SyncPullServer = grpc.ServerStreamingServer[SyncMessage]
func _Volume_ReadFile_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(FSReadRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(VolumeServer).ReadFile(m, &grpc.GenericServerStream[FSReadRequest, FSDataChunk]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_ReadFileServer = grpc.ServerStreamingServer[FSDataChunk]
func _Volume_WriteFile_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(VolumeServer).WriteFile(&grpc.GenericServerStream[FSWriteChunk, FSWriteResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Volume_WriteFileServer = grpc.ClientStreamingServer[FSWriteChunk, FSWriteResponse]
func _Volume_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Stat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Stat_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Stat(ctx, req.(*FSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_ListDir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).ListDir(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_ListDir_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).ListDir(ctx, req.(*FSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRemoveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Remove(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Remove_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Remove(ctx, req.(*FSRemoveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Rename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRenameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Rename(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Rename_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Rename(ctx, req.(*FSRenameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_MkdirAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).MkdirAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_MkdirAll_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).MkdirAll(ctx, req.(*FSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Abs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Abs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Abs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Abs(ctx, req.(*FSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Copy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FSCopyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Copy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Copy_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Copy(ctx, req.(*FSCopyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Zip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Zip(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Zip_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Zip(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Unzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Unzip(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Unzip_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Unzip(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Gzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Gzip(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Gzip_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Gzip(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Gunzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Gunzip(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Gunzip_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Gunzip(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Tar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Tar(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Tar_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Tar(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Untar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Untar(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Untar_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Untar(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Tgz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Tgz(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Tgz_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Tgz(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Volume_Untgz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServer).Untgz(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Volume_Untgz_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServer).Untgz(ctx, req.(*ArchiveRequest))
}
return interceptor(ctx, in, info, handler)
}
// Volume_ServiceDesc is the grpc.ServiceDesc for Volume service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Volume_ServiceDesc = grpc.ServiceDesc{
ServiceName: "volume.Volume",
HandlerType: (*VolumeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Stat",
Handler: _Volume_Stat_Handler,
},
{
MethodName: "ListDir",
Handler: _Volume_ListDir_Handler,
},
{
MethodName: "Remove",
Handler: _Volume_Remove_Handler,
},
{
MethodName: "Rename",
Handler: _Volume_Rename_Handler,
},
{
MethodName: "MkdirAll",
Handler: _Volume_MkdirAll_Handler,
},
{
MethodName: "Abs",
Handler: _Volume_Abs_Handler,
},
{
MethodName: "Copy",
Handler: _Volume_Copy_Handler,
},
{
MethodName: "Zip",
Handler: _Volume_Zip_Handler,
},
{
MethodName: "Unzip",
Handler: _Volume_Unzip_Handler,
},
{
MethodName: "Gzip",
Handler: _Volume_Gzip_Handler,
},
{
MethodName: "Gunzip",
Handler: _Volume_Gunzip_Handler,
},
{
MethodName: "Tar",
Handler: _Volume_Tar_Handler,
},
{
MethodName: "Untar",
Handler: _Volume_Untar_Handler,
},
{
MethodName: "Tgz",
Handler: _Volume_Tgz_Handler,
},
{
MethodName: "Untgz",
Handler: _Volume_Untgz_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "SyncPush",
Handler: _Volume_SyncPush_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "SyncPull",
Handler: _Volume_SyncPull_Handler,
ServerStreams: true,
},
{
StreamName: "ReadFile",
Handler: _Volume_ReadFile_Handler,
ServerStreams: true,
},
{
StreamName: "WriteFile",
Handler: _Volume_WriteFile_Handler,
ClientStreams: true,
},
},
Metadata: "tai/volume/pb/volume.proto",
}