Documentation ¶
Index ¶
- Variables
- func RegisterFileServer(s grpc.ServiceRegistrar, srv FileServer)
- func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
- type FileClient
- type FileData
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)deprecated
- func (x *FileInfo) GetMd5() string
- func (x *FileInfo) GetMode() uint32
- func (x *FileInfo) GetPath() string
- func (x *FileInfo) GetSize() int64
- func (x *FileInfo) GetType() FileInfo_FileType
- func (*FileInfo) ProtoMessage()
- func (x *FileInfo) ProtoReflect() protoreflect.Message
- func (x *FileInfo) Reset()
- func (x *FileInfo) String() string
- type FileInfo_FileType
- func (FileInfo_FileType) Descriptor() protoreflect.EnumDescriptor
- func (x FileInfo_FileType) Enum() *FileInfo_FileType
- func (FileInfo_FileType) EnumDescriptor() ([]byte, []int)deprecated
- func (x FileInfo_FileType) Number() protoreflect.EnumNumber
- func (x FileInfo_FileType) String() string
- func (FileInfo_FileType) Type() protoreflect.EnumType
- type FileServer
- type FileTodo
- type FileTodo_FileAction
- func (FileTodo_FileAction) Descriptor() protoreflect.EnumDescriptor
- func (x FileTodo_FileAction) Enum() *FileTodo_FileAction
- func (FileTodo_FileAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x FileTodo_FileAction) Number() protoreflect.EnumNumber
- func (x FileTodo_FileAction) String() string
- func (FileTodo_FileAction) Type() protoreflect.EnumType
- type File_CompareClient
- type File_CompareServer
- type File_PushClient
- type File_PushServer
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetArch() string
- func (x *InfoResponse) GetHostname() string
- func (x *InfoResponse) GetIp() string
- func (x *InfoResponse) GetLaunchTime() string
- func (x *InfoResponse) GetOs() string
- func (x *InfoResponse) GetPid() string
- func (x *InfoResponse) GetPwd() string
- func (x *InfoResponse) GetRunningTime() string
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- type SystemClient
- type SystemServer
- type UnimplementedFileServer
- type UnimplementedSystemServer
- type UnsafeFileServer
- type UnsafeSystemServer
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetBuildTime() string
- func (x *VersionResponse) GetCurrentVersion() string
- func (x *VersionResponse) GetGitBranch() string
- func (x *VersionResponse) GetGitSha() string
- func (x *VersionResponse) GetGitTag() string
- func (x *VersionResponse) GetGoOsArch() string
- func (x *VersionResponse) GetGoVersion() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( FileInfo_FileType_name = map[int32]string{ 0: "DIR", 1: "FILE", } FileInfo_FileType_value = map[string]int32{ "DIR": 0, "FILE": 1, } )
Enum value maps for FileInfo_FileType.
var ( FileTodo_FileAction_name = map[int32]string{ 0: "NOCHANGE", 1: "ADD", 2: "UPDATE", } FileTodo_FileAction_value = map[string]int32{ "NOCHANGE": 0, "ADD": 1, "UPDATE": 2, } )
Enum value maps for FileTodo_FileAction.
var File_ServiceDesc = grpc.ServiceDesc{ ServiceName: "canary.File", HandlerType: (*FileServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Compare", Handler: _File_Compare_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Push", Handler: _File_Push_Handler, ClientStreams: true, }, }, Metadata: "file.proto", }
File_ServiceDesc is the grpc.ServiceDesc for File service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_file_proto protoreflect.FileDescriptor
var File_system_proto protoreflect.FileDescriptor
var System_ServiceDesc = grpc.ServiceDesc{ ServiceName: "canary.System", HandlerType: (*SystemServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _System_Version_Handler, }, { MethodName: "Info", Handler: _System_Info_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "system.proto", }
System_ServiceDesc is the grpc.ServiceDesc for System service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFileServer ¶
func RegisterFileServer(s grpc.ServiceRegistrar, srv FileServer)
func RegisterSystemServer ¶
func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
Types ¶
type FileClient ¶
type FileClient interface { Compare(ctx context.Context, opts ...grpc.CallOption) (File_CompareClient, error) Push(ctx context.Context, opts ...grpc.CallOption) (File_PushClient, error) }
FileClient is the client API for File service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFileClient ¶
func NewFileClient(cc grpc.ClientConnInterface) FileClient
type FileData ¶
type FileData struct { Info *FileInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FileData) Descriptor
deprecated
func (*FileData) ProtoMessage ¶
func (*FileData) ProtoMessage()
func (*FileData) ProtoReflect ¶
func (x *FileData) ProtoReflect() protoreflect.Message
type FileInfo ¶
type FileInfo struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Type FileInfo_FileType `protobuf:"varint,2,opt,name=type,proto3,enum=canary.FileInfo_FileType" json:"type,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` Md5 string `protobuf:"bytes,4,opt,name=md5,proto3" json:"md5,omitempty"` Mode uint32 `protobuf:"varint,5,opt,name=mode,proto3" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) Descriptor
deprecated
func (*FileInfo) GetType ¶
func (x *FileInfo) GetType() FileInfo_FileType
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) ProtoReflect ¶
func (x *FileInfo) ProtoReflect() protoreflect.Message
type FileInfo_FileType ¶
type FileInfo_FileType int32
const ( FileInfo_DIR FileInfo_FileType = 0 FileInfo_FILE FileInfo_FileType = 1 )
func (FileInfo_FileType) Descriptor ¶
func (FileInfo_FileType) Descriptor() protoreflect.EnumDescriptor
func (FileInfo_FileType) Enum ¶
func (x FileInfo_FileType) Enum() *FileInfo_FileType
func (FileInfo_FileType) EnumDescriptor
deprecated
func (FileInfo_FileType) EnumDescriptor() ([]byte, []int)
Deprecated: Use FileInfo_FileType.Descriptor instead.
func (FileInfo_FileType) Number ¶
func (x FileInfo_FileType) Number() protoreflect.EnumNumber
func (FileInfo_FileType) String ¶
func (x FileInfo_FileType) String() string
func (FileInfo_FileType) Type ¶
func (FileInfo_FileType) Type() protoreflect.EnumType
type FileServer ¶
type FileServer interface { Compare(File_CompareServer) error Push(File_PushServer) error // contains filtered or unexported methods }
FileServer is the server API for File service. All implementations must embed UnimplementedFileServer for forward compatibility
type FileTodo ¶
type FileTodo struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Action FileTodo_FileAction `protobuf:"varint,2,opt,name=action,proto3,enum=canary.FileTodo_FileAction" json:"action,omitempty"` // contains filtered or unexported fields }
func (*FileTodo) Descriptor
deprecated
func (*FileTodo) GetAction ¶
func (x *FileTodo) GetAction() FileTodo_FileAction
func (*FileTodo) ProtoMessage ¶
func (*FileTodo) ProtoMessage()
func (*FileTodo) ProtoReflect ¶
func (x *FileTodo) ProtoReflect() protoreflect.Message
type FileTodo_FileAction ¶
type FileTodo_FileAction int32
const ( FileTodo_NOCHANGE FileTodo_FileAction = 0 FileTodo_ADD FileTodo_FileAction = 1 FileTodo_UPDATE FileTodo_FileAction = 2 )
func (FileTodo_FileAction) Descriptor ¶
func (FileTodo_FileAction) Descriptor() protoreflect.EnumDescriptor
func (FileTodo_FileAction) Enum ¶
func (x FileTodo_FileAction) Enum() *FileTodo_FileAction
func (FileTodo_FileAction) EnumDescriptor
deprecated
func (FileTodo_FileAction) EnumDescriptor() ([]byte, []int)
Deprecated: Use FileTodo_FileAction.Descriptor instead.
func (FileTodo_FileAction) Number ¶
func (x FileTodo_FileAction) Number() protoreflect.EnumNumber
func (FileTodo_FileAction) String ¶
func (x FileTodo_FileAction) String() string
func (FileTodo_FileAction) Type ¶
func (FileTodo_FileAction) Type() protoreflect.EnumType
type File_CompareClient ¶
type File_CompareServer ¶
type File_PushClient ¶
type File_PushServer ¶
type InfoResponse ¶
type InfoResponse struct { Pid string `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` LaunchTime string `protobuf:"bytes,3,opt,name=launch_time,json=launchTime,proto3" json:"launch_time,omitempty"` Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"` Os string `protobuf:"bytes,5,opt,name=os,proto3" json:"os,omitempty"` Arch string `protobuf:"bytes,6,opt,name=arch,proto3" json:"arch,omitempty"` RunningTime string `protobuf:"bytes,7,opt,name=running_time,json=runningTime,proto3" json:"running_time,omitempty"` Ip string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetArch ¶
func (x *InfoResponse) GetArch() string
func (*InfoResponse) GetHostname ¶
func (x *InfoResponse) GetHostname() string
func (*InfoResponse) GetIp ¶
func (x *InfoResponse) GetIp() string
func (*InfoResponse) GetLaunchTime ¶
func (x *InfoResponse) GetLaunchTime() string
func (*InfoResponse) GetOs ¶
func (x *InfoResponse) GetOs() string
func (*InfoResponse) GetPid ¶
func (x *InfoResponse) GetPid() string
func (*InfoResponse) GetPwd ¶
func (x *InfoResponse) GetPwd() string
func (*InfoResponse) GetRunningTime ¶
func (x *InfoResponse) GetRunningTime() string
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
type SystemClient ¶
type SystemClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoResponse, error) }
SystemClient is the client API for System service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSystemClient ¶
func NewSystemClient(cc grpc.ClientConnInterface) SystemClient
type SystemServer ¶
type SystemServer interface { Version(context.Context, *emptypb.Empty) (*VersionResponse, error) Info(context.Context, *emptypb.Empty) (*InfoResponse, error) // contains filtered or unexported methods }
SystemServer is the server API for System service. All implementations must embed UnimplementedSystemServer for forward compatibility
type UnimplementedFileServer ¶
type UnimplementedFileServer struct { }
UnimplementedFileServer must be embedded to have forward compatible implementations.
func (UnimplementedFileServer) Compare ¶
func (UnimplementedFileServer) Compare(File_CompareServer) error
func (UnimplementedFileServer) Push ¶
func (UnimplementedFileServer) Push(File_PushServer) error
type UnimplementedSystemServer ¶
type UnimplementedSystemServer struct { }
UnimplementedSystemServer must be embedded to have forward compatible implementations.
func (UnimplementedSystemServer) Info ¶
func (UnimplementedSystemServer) Info(context.Context, *emptypb.Empty) (*InfoResponse, error)
func (UnimplementedSystemServer) Version ¶
func (UnimplementedSystemServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
type UnsafeFileServer ¶
type UnsafeFileServer interface {
// contains filtered or unexported methods
}
UnsafeFileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileServer will result in compilation errors.
type UnsafeSystemServer ¶
type UnsafeSystemServer interface {
// contains filtered or unexported methods
}
UnsafeSystemServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SystemServer will result in compilation errors.
type VersionResponse ¶
type VersionResponse struct { CurrentVersion string `protobuf:"bytes,1,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"` GoVersion string `protobuf:"bytes,2,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` GoOsArch string `protobuf:"bytes,3,opt,name=go_os_arch,json=goOsArch,proto3" json:"go_os_arch,omitempty"` GitSha string `protobuf:"bytes,4,opt,name=git_sha,json=gitSha,proto3" json:"git_sha,omitempty"` GitTag string `protobuf:"bytes,5,opt,name=git_tag,json=gitTag,proto3" json:"git_tag,omitempty"` GitBranch string `protobuf:"bytes,6,opt,name=git_branch,json=gitBranch,proto3" json:"git_branch,omitempty"` BuildTime string `protobuf:"bytes,7,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"` // contains filtered or unexported fields }
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetBuildTime ¶
func (x *VersionResponse) GetBuildTime() string
func (*VersionResponse) GetCurrentVersion ¶
func (x *VersionResponse) GetCurrentVersion() string
func (*VersionResponse) GetGitBranch ¶
func (x *VersionResponse) GetGitBranch() string
func (*VersionResponse) GetGitSha ¶
func (x *VersionResponse) GetGitSha() string
func (*VersionResponse) GetGitTag ¶
func (x *VersionResponse) GetGitTag() string
func (*VersionResponse) GetGoOsArch ¶
func (x *VersionResponse) GetGoOsArch() string
func (*VersionResponse) GetGoVersion ¶
func (x *VersionResponse) GetGoVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string