pb

package
v0.0.0-...-fa3ab40 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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)

View Source
var File_system_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use FileData.ProtoReflect.Descriptor instead.

func (*FileData) GetData

func (x *FileData) GetData() []byte

func (*FileData) GetInfo

func (x *FileData) GetInfo() *FileInfo

func (*FileData) ProtoMessage

func (*FileData) ProtoMessage()

func (*FileData) ProtoReflect

func (x *FileData) ProtoReflect() protoreflect.Message

func (*FileData) Reset

func (x *FileData) Reset()

func (*FileData) String

func (x *FileData) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.

func (*FileInfo) GetMd5

func (x *FileInfo) GetMd5() string

func (*FileInfo) GetMode

func (x *FileInfo) GetMode() uint32

func (*FileInfo) GetPath

func (x *FileInfo) GetPath() string

func (*FileInfo) GetSize

func (x *FileInfo) GetSize() int64

func (*FileInfo) GetType

func (x *FileInfo) GetType() FileInfo_FileType

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) ProtoReflect

func (x *FileInfo) ProtoReflect() protoreflect.Message

func (*FileInfo) Reset

func (x *FileInfo) Reset()

func (*FileInfo) String

func (x *FileInfo) String() string

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) Enum

func (FileInfo_FileType) EnumDescriptor deprecated

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

Deprecated: Use FileInfo_FileType.Descriptor instead.

func (FileInfo_FileType) Number

func (FileInfo_FileType) String

func (x FileInfo_FileType) String() string

func (FileInfo_FileType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use FileTodo.ProtoReflect.Descriptor instead.

func (*FileTodo) GetAction

func (x *FileTodo) GetAction() FileTodo_FileAction

func (*FileTodo) GetPath

func (x *FileTodo) GetPath() string

func (*FileTodo) ProtoMessage

func (*FileTodo) ProtoMessage()

func (*FileTodo) ProtoReflect

func (x *FileTodo) ProtoReflect() protoreflect.Message

func (*FileTodo) Reset

func (x *FileTodo) Reset()

func (*FileTodo) String

func (x *FileTodo) String() string

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) Enum

func (FileTodo_FileAction) EnumDescriptor deprecated

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

Deprecated: Use FileTodo_FileAction.Descriptor instead.

func (FileTodo_FileAction) Number

func (FileTodo_FileAction) String

func (x FileTodo_FileAction) String() string

func (FileTodo_FileAction) Type

type File_CompareClient

type File_CompareClient interface {
	Send(*FileInfo) error
	Recv() (*FileTodo, error)
	grpc.ClientStream
}

type File_CompareServer

type File_CompareServer interface {
	Send(*FileTodo) error
	Recv() (*FileInfo, error)
	grpc.ServerStream
}

type File_PushClient

type File_PushClient interface {
	Send(*FileData) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type File_PushServer

type File_PushServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*FileData, error)
	grpc.ServerStream
}

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) Push

type UnimplementedSystemServer

type UnimplementedSystemServer struct {
}

UnimplementedSystemServer must be embedded to have forward compatible implementations.

func (UnimplementedSystemServer) Info

func (UnimplementedSystemServer) Version

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

Jump to

Keyboard shortcuts

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