pb

package
v0.0.0-...-c266f6d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Agent",
	HandlerType: (*AgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Craw",
			Handler:    _Agent_Craw_Handler,
		},
		{
			MethodName: "Check",
			Handler:    _Agent_Check_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/pb/agent.proto",
}

Agent_ServiceDesc is the grpc.ServiceDesc for Agent 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 Commander_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Commander",
	HandlerType: (*CommanderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateCron",
			Handler:    _Commander_UpdateCron_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/pb/commander.proto",
}

Commander_ServiceDesc is the grpc.ServiceDesc for Commander 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_internal_pb_agent_proto protoreflect.FileDescriptor
View Source
var File_internal_pb_commander_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

func RegisterCommanderServer

func RegisterCommanderServer(s grpc.ServiceRegistrar, srv CommanderServer)

Types

type AgentClient

type AgentClient interface {
	Craw(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Result, error)
	Check(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*Pong, error)
}

AgentClient is the client API for Agent 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 NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	Craw(context.Context, *Job) (*Result, error)
	Check(context.Context, *Ping) (*Pong, error)
	// contains filtered or unexported methods
}

AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility

type CommanderClient

type CommanderClient interface {
	UpdateCron(ctx context.Context, in *Cron, opts ...grpc.CallOption) (*CronRes, error)
}

CommanderClient is the client API for Commander 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 NewCommanderClient

func NewCommanderClient(cc grpc.ClientConnInterface) CommanderClient

type CommanderServer

type CommanderServer interface {
	UpdateCron(context.Context, *Cron) (*CronRes, error)
	// contains filtered or unexported methods
}

CommanderServer is the server API for Commander service. All implementations must embed UnimplementedCommanderServer for forward compatibility

type Cron

type Cron struct {
	Site string `protobuf:"bytes,1,opt,name=site,proto3" json:"site,omitempty"`
	// contains filtered or unexported fields
}

func (*Cron) Descriptor deprecated

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

Deprecated: Use Cron.ProtoReflect.Descriptor instead.

func (*Cron) GetSite

func (x *Cron) GetSite() string

func (*Cron) ProtoMessage

func (*Cron) ProtoMessage()

func (*Cron) ProtoReflect

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

func (*Cron) Reset

func (x *Cron) Reset()

func (*Cron) String

func (x *Cron) String() string

type CronRes

type CronRes struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*CronRes) Descriptor deprecated

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

Deprecated: Use CronRes.ProtoReflect.Descriptor instead.

func (*CronRes) GetSuccess

func (x *CronRes) GetSuccess() bool

func (*CronRes) ProtoMessage

func (*CronRes) ProtoMessage()

func (*CronRes) ProtoReflect

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

func (*CronRes) Reset

func (x *CronRes) Reset()

func (*CronRes) String

func (x *CronRes) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Job

type Job struct {
	Name    string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Headers []*Job_Header `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*Job) Descriptor deprecated

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

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetHeaders

func (x *Job) GetHeaders() []*Job_Header

func (*Job) GetName

func (x *Job) GetName() string

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

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

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type Job_Header

type Job_Header struct {
	Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Val string `protobuf:"bytes,2,opt,name=Val,proto3" json:"Val,omitempty"`
	// contains filtered or unexported fields
}

func (*Job_Header) Descriptor deprecated

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

Deprecated: Use Job_Header.ProtoReflect.Descriptor instead.

func (*Job_Header) GetKey

func (x *Job_Header) GetKey() string

func (*Job_Header) GetVal

func (x *Job_Header) GetVal() string

func (*Job_Header) ProtoMessage

func (*Job_Header) ProtoMessage()

func (*Job_Header) ProtoReflect

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

func (*Job_Header) Reset

func (x *Job_Header) Reset()

func (*Job_Header) String

func (x *Job_Header) String() string

type Ping

type Ping struct {
	Ping string `protobuf:"bytes,1,opt,name=ping,proto3" json:"ping,omitempty"`
	// contains filtered or unexported fields
}

func (*Ping) Descriptor deprecated

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) GetPing

func (x *Ping) GetPing() string

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

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

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type Pong

type Pong struct {
	Pong string `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"`
	// contains filtered or unexported fields
}

func (*Pong) Descriptor deprecated

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

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) GetPong

func (x *Pong) GetPong() string

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect

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

func (*Pong) Reset

func (x *Pong) Reset()

func (*Pong) String

func (x *Pong) String() string

type Result

type Result struct {
	HotMap map[string]string `` /* 153-byte string literal not displayed */
	T      string            `protobuf:"bytes,2,opt,name=T,proto3" json:"T,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetHotMap

func (x *Result) GetHotMap() map[string]string

func (*Result) GetT

func (x *Result) GetT() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServer) Check

func (UnimplementedAgentServer) Craw

type UnimplementedCommanderServer

type UnimplementedCommanderServer struct {
}

UnimplementedCommanderServer must be embedded to have forward compatible implementations.

func (UnimplementedCommanderServer) UpdateCron

type UnsafeAgentServer

type UnsafeAgentServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServer will result in compilation errors.

type UnsafeCommanderServer

type UnsafeCommanderServer interface {
	// contains filtered or unexported methods
}

UnsafeCommanderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommanderServer will result in compilation errors.

Jump to

Keyboard shortcuts

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