rpc

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: LGPL-2.1 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ExecuteResponse_MessageKind_name = map[int32]string{
	0: "Unknown",
	1: "Ping",
	2: "Data",
}
View Source
var ExecuteResponse_MessageKind_value = map[string]int32{
	"Unknown": 0,
	"Ping":    1,
	"Data":    2,
}

Functions

func RegisterRemoteRPCServer

func RegisterRemoteRPCServer(s *grpc.Server, srv RemoteRPCServer)

Types

type Chunk

type Chunk struct {
	Data   []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Length int64  `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
}

func (*Chunk) Descriptor

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

func (*Chunk) Marshal

func (m *Chunk) Marshal() (dAtA []byte, err error)

func (*Chunk) MarshalTo

func (m *Chunk) MarshalTo(dAtA []byte) (int, error)

func (*Chunk) MarshalToSizedBuffer

func (m *Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) Reset

func (m *Chunk) Reset()

func (*Chunk) String

func (m *Chunk) String() string

func (*Chunk) Unmarshal

func (m *Chunk) Unmarshal(dAtA []byte) error

func (*Chunk) XSize

func (m *Chunk) XSize() (n int)

func (*Chunk) XXX_DiscardUnknown

func (m *Chunk) XXX_DiscardUnknown()

func (*Chunk) XXX_Marshal

func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Chunk) XXX_Merge

func (m *Chunk) XXX_Merge(src proto.Message)

func (*Chunk) XXX_Size

func (m *Chunk) XXX_Size() int

func (*Chunk) XXX_Unmarshal

func (m *Chunk) XXX_Unmarshal(b []byte) error

type ExecuteRequest

type ExecuteRequest struct {
	Name string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Args []string          `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	Envs map[string]string `` /* 149-byte string literal not displayed */
	Data []byte            `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Root string            `protobuf:"bytes,5,opt,name=root,proto3" json:"root,omitempty"`
}

func (*ExecuteRequest) Descriptor

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

func (*ExecuteRequest) Marshal

func (m *ExecuteRequest) Marshal() (dAtA []byte, err error)

func (*ExecuteRequest) MarshalTo

func (m *ExecuteRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExecuteRequest) MarshalToSizedBuffer

func (m *ExecuteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) Reset

func (m *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (m *ExecuteRequest) String() string

func (*ExecuteRequest) Unmarshal

func (m *ExecuteRequest) Unmarshal(dAtA []byte) error

func (*ExecuteRequest) XSize

func (m *ExecuteRequest) XSize() (n int)

func (*ExecuteRequest) XXX_DiscardUnknown

func (m *ExecuteRequest) XXX_DiscardUnknown()

func (*ExecuteRequest) XXX_Marshal

func (m *ExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteRequest) XXX_Merge

func (m *ExecuteRequest) XXX_Merge(src proto.Message)

func (*ExecuteRequest) XXX_Size

func (m *ExecuteRequest) XXX_Size() int

func (*ExecuteRequest) XXX_Unmarshal

func (m *ExecuteRequest) XXX_Unmarshal(b []byte) error

type ExecuteResponse

type ExecuteResponse struct {
	Kind   ExecuteResponse_MessageKind `protobuf:"varint,1,opt,name=kind,proto3,enum=rpc.ExecuteResponse_MessageKind" json:"kind,omitempty"`
	Stdout []byte                      `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr []byte                      `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"`
}

func (*ExecuteResponse) Descriptor

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

func (*ExecuteResponse) Marshal

func (m *ExecuteResponse) Marshal() (dAtA []byte, err error)

func (*ExecuteResponse) MarshalTo

func (m *ExecuteResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExecuteResponse) MarshalToSizedBuffer

func (m *ExecuteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) Reset

func (m *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (m *ExecuteResponse) String() string

func (*ExecuteResponse) Unmarshal

func (m *ExecuteResponse) Unmarshal(dAtA []byte) error

func (*ExecuteResponse) XSize

func (m *ExecuteResponse) XSize() (n int)

func (*ExecuteResponse) XXX_DiscardUnknown

func (m *ExecuteResponse) XXX_DiscardUnknown()

func (*ExecuteResponse) XXX_Marshal

func (m *ExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteResponse) XXX_Merge

func (m *ExecuteResponse) XXX_Merge(src proto.Message)

func (*ExecuteResponse) XXX_Size

func (m *ExecuteResponse) XXX_Size() int

func (*ExecuteResponse) XXX_Unmarshal

func (m *ExecuteResponse) XXX_Unmarshal(b []byte) error

type ExecuteResponse_MessageKind added in v0.4.7

type ExecuteResponse_MessageKind int32
const (
	ExecuteResponse_Unknown ExecuteResponse_MessageKind = 0
	ExecuteResponse_Ping    ExecuteResponse_MessageKind = 1
	ExecuteResponse_Data    ExecuteResponse_MessageKind = 2
)

func (ExecuteResponse_MessageKind) EnumDescriptor added in v0.4.7

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

func (ExecuteResponse_MessageKind) String added in v0.4.7

type FileStat

type FileStat struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IsDir   bool   `protobuf:"varint,2,opt,name=isDir,proto3" json:"isDir,omitempty"`
	Perm    uint32 `protobuf:"varint,3,opt,name=perm,proto3" json:"perm,omitempty"`
	Size    int64  `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	ModTime int64  `protobuf:"varint,5,opt,name=modTime,proto3" json:"modTime,omitempty"`
}

func (*FileStat) Descriptor

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

func (*FileStat) Marshal

func (m *FileStat) Marshal() (dAtA []byte, err error)

func (*FileStat) MarshalTo

func (m *FileStat) MarshalTo(dAtA []byte) (int, error)

func (*FileStat) MarshalToSizedBuffer

func (m *FileStat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FileStat) ProtoMessage

func (*FileStat) ProtoMessage()

func (*FileStat) Reset

func (m *FileStat) Reset()

func (*FileStat) String

func (m *FileStat) String() string

func (*FileStat) Unmarshal

func (m *FileStat) Unmarshal(dAtA []byte) error

func (*FileStat) XSize

func (m *FileStat) XSize() (n int)

func (*FileStat) XXX_DiscardUnknown

func (m *FileStat) XXX_DiscardUnknown()

func (*FileStat) XXX_Marshal

func (m *FileStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileStat) XXX_Merge

func (m *FileStat) XXX_Merge(src proto.Message)

func (*FileStat) XXX_Size

func (m *FileStat) XXX_Size() int

func (*FileStat) XXX_Unmarshal

func (m *FileStat) XXX_Unmarshal(b []byte) error

type GetRequest

type GetRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	CacheSize int64  `protobuf:"varint,2,opt,name=cacheSize,proto3" json:"cacheSize,omitempty"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) Marshal

func (m *GetRequest) Marshal() (dAtA []byte, err error)

func (*GetRequest) MarshalTo

func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetRequest) MarshalToSizedBuffer

func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

func (m *GetRequest) Unmarshal(dAtA []byte) error

func (*GetRequest) XSize

func (m *GetRequest) XSize() (n int)

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type GetResponse

type GetResponse struct {
	Stat  *FileStat `protobuf:"bytes,1,opt,name=stat,proto3" json:"stat,omitempty"`
	Chunk *Chunk    `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) Marshal

func (m *GetResponse) Marshal() (dAtA []byte, err error)

func (*GetResponse) MarshalTo

func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetResponse) MarshalToSizedBuffer

func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal

func (m *GetResponse) Unmarshal(dAtA []byte) error

func (*GetResponse) XSize

func (m *GetResponse) XSize() (n int)

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetResponse) XXX_Merge

func (m *GetResponse) XXX_Merge(src proto.Message)

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

func (m *GetResponse) XXX_Unmarshal(b []byte) error

type PutRequest

type PutRequest struct {
	Name  string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Stat  *FileStat `protobuf:"bytes,2,opt,name=stat,proto3" json:"stat,omitempty"`
	Chunk *Chunk    `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
}

func (*PutRequest) Descriptor

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

func (*PutRequest) Marshal

func (m *PutRequest) Marshal() (dAtA []byte, err error)

func (*PutRequest) MarshalTo

func (m *PutRequest) MarshalTo(dAtA []byte) (int, error)

func (*PutRequest) MarshalToSizedBuffer

func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset

func (m *PutRequest) Reset()

func (*PutRequest) String

func (m *PutRequest) String() string

func (*PutRequest) Unmarshal

func (m *PutRequest) Unmarshal(dAtA []byte) error

func (*PutRequest) XSize

func (m *PutRequest) XSize() (n int)

func (*PutRequest) XXX_DiscardUnknown

func (m *PutRequest) XXX_DiscardUnknown()

func (*PutRequest) XXX_Marshal

func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutRequest) XXX_Merge

func (m *PutRequest) XXX_Merge(src proto.Message)

func (*PutRequest) XXX_Size

func (m *PutRequest) XXX_Size() int

func (*PutRequest) XXX_Unmarshal

func (m *PutRequest) XXX_Unmarshal(b []byte) error

type PutResponse

type PutResponse struct {
}

func (*PutResponse) Descriptor

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

func (*PutResponse) Marshal

func (m *PutResponse) Marshal() (dAtA []byte, err error)

func (*PutResponse) MarshalTo

func (m *PutResponse) MarshalTo(dAtA []byte) (int, error)

func (*PutResponse) MarshalToSizedBuffer

func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) String

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal

func (m *PutResponse) Unmarshal(dAtA []byte) error

func (*PutResponse) XSize

func (m *PutResponse) XSize() (n int)

func (*PutResponse) XXX_DiscardUnknown

func (m *PutResponse) XXX_DiscardUnknown()

func (*PutResponse) XXX_Marshal

func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutResponse) XXX_Merge

func (m *PutResponse) XXX_Merge(src proto.Message)

func (*PutResponse) XXX_Size

func (m *PutResponse) XXX_Size() int

func (*PutResponse) XXX_Unmarshal

func (m *PutResponse) XXX_Unmarshal(b []byte) error

type RemoteRPCClient

type RemoteRPCClient interface {
	Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (RemoteRPC_GetClient, error)
	Put(ctx context.Context, opts ...grpc.CallOption) (RemoteRPC_PutClient, error)
	Execute(ctx context.Context, opts ...grpc.CallOption) (RemoteRPC_ExecuteClient, error)
}

RemoteRPCClient is the client API for RemoteRPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRemoteRPCClient

func NewRemoteRPCClient(cc *grpc.ClientConn) RemoteRPCClient

type RemoteRPCServer

RemoteRPCServer is the server API for RemoteRPC service.

type RemoteRPC_ExecuteClient

type RemoteRPC_ExecuteClient interface {
	Send(*ExecuteRequest) error
	Recv() (*ExecuteResponse, error)
	grpc.ClientStream
}

type RemoteRPC_ExecuteServer

type RemoteRPC_ExecuteServer interface {
	Send(*ExecuteResponse) error
	Recv() (*ExecuteRequest, error)
	grpc.ServerStream
}

type RemoteRPC_GetClient

type RemoteRPC_GetClient interface {
	Recv() (*GetResponse, error)
	grpc.ClientStream
}

type RemoteRPC_GetServer

type RemoteRPC_GetServer interface {
	Send(*GetResponse) error
	grpc.ServerStream
}

type RemoteRPC_PutClient

type RemoteRPC_PutClient interface {
	Send(*PutRequest) error
	CloseAndRecv() (*PutResponse, error)
	grpc.ClientStream
}

type RemoteRPC_PutServer

type RemoteRPC_PutServer interface {
	SendAndClose(*PutResponse) error
	Recv() (*PutRequest, error)
	grpc.ServerStream
}

type StatRequest

type StatRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (*StatRequest) Descriptor

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

func (*StatRequest) Marshal

func (m *StatRequest) Marshal() (dAtA []byte, err error)

func (*StatRequest) MarshalTo

func (m *StatRequest) MarshalTo(dAtA []byte) (int, error)

func (*StatRequest) MarshalToSizedBuffer

func (m *StatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StatRequest) ProtoMessage

func (*StatRequest) ProtoMessage()

func (*StatRequest) Reset

func (m *StatRequest) Reset()

func (*StatRequest) String

func (m *StatRequest) String() string

func (*StatRequest) Unmarshal

func (m *StatRequest) Unmarshal(dAtA []byte) error

func (*StatRequest) XSize

func (m *StatRequest) XSize() (n int)

func (*StatRequest) XXX_DiscardUnknown

func (m *StatRequest) XXX_DiscardUnknown()

func (*StatRequest) XXX_Marshal

func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatRequest) XXX_Merge

func (m *StatRequest) XXX_Merge(src proto.Message)

func (*StatRequest) XXX_Size

func (m *StatRequest) XXX_Size() int

func (*StatRequest) XXX_Unmarshal

func (m *StatRequest) XXX_Unmarshal(b []byte) error

type StatResponse

type StatResponse struct {
	Stat *FileStat `protobuf:"bytes,1,opt,name=stat,proto3" json:"stat,omitempty"`
}

func (*StatResponse) Descriptor

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

func (*StatResponse) Marshal

func (m *StatResponse) Marshal() (dAtA []byte, err error)

func (*StatResponse) MarshalTo

func (m *StatResponse) MarshalTo(dAtA []byte) (int, error)

func (*StatResponse) MarshalToSizedBuffer

func (m *StatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StatResponse) ProtoMessage

func (*StatResponse) ProtoMessage()

func (*StatResponse) Reset

func (m *StatResponse) Reset()

func (*StatResponse) String

func (m *StatResponse) String() string

func (*StatResponse) Unmarshal

func (m *StatResponse) Unmarshal(dAtA []byte) error

func (*StatResponse) XSize

func (m *StatResponse) XSize() (n int)

func (*StatResponse) XXX_DiscardUnknown

func (m *StatResponse) XXX_DiscardUnknown()

func (*StatResponse) XXX_Marshal

func (m *StatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatResponse) XXX_Merge

func (m *StatResponse) XXX_Merge(src proto.Message)

func (*StatResponse) XXX_Size

func (m *StatResponse) XXX_Size() int

func (*StatResponse) XXX_Unmarshal

func (m *StatResponse) XXX_Unmarshal(b []byte) error

type UnimplementedRemoteRPCServer

type UnimplementedRemoteRPCServer struct {
}

UnimplementedRemoteRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedRemoteRPCServer) Execute

func (*UnimplementedRemoteRPCServer) Get

func (*UnimplementedRemoteRPCServer) Put

func (*UnimplementedRemoteRPCServer) Stat

Jump to

Keyboard shortcuts

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