proto

package
v0.2.0-beta-2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentService_Connect_FullMethodName = "/bridge.AgentService/Connect"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "STATUS_OK",
		2: "STATUS_ERROR",
		3: "STATUS_DONE",
	}
	Status_value = map[string]int32{
		"STATUS_UNSPECIFIED": 0,
		"STATUS_OK":          1,
		"STATUS_ERROR":       2,
		"STATUS_DONE":        3,
	}
)

Enum value maps for Status.

View Source
var (
	JobKind_name = map[int32]string{
		0: "JOB_KIND_UNSPECIFIED",
		1: "JOB_KIND_QUERY",
		2: "JOB_KIND_PING_SERVICE",
		3: "JOB_KIND_PING_DATABASE",
		4: "JOB_KIND_CONNECT",
		5: "JOB_KIND_DISCONNECT",
		6: "JOB_KIND_START_JDBC",
		7: "JOB_KIND_STOP_JDBC",
	}
	JobKind_value = map[string]int32{
		"JOB_KIND_UNSPECIFIED":   0,
		"JOB_KIND_QUERY":         1,
		"JOB_KIND_PING_SERVICE":  2,
		"JOB_KIND_PING_DATABASE": 3,
		"JOB_KIND_CONNECT":       4,
		"JOB_KIND_DISCONNECT":    5,
		"JOB_KIND_START_JDBC":    6,
		"JOB_KIND_STOP_JDBC":     7,
	}
)

Enum value maps for JobKind.

View Source
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bridge.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Connect",
			Handler:       _AgentService_Connect_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/bridge.proto",
}

AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService 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_proto_bridge_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServiceServer

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)

Types

type AgentHello

type AgentHello struct {
	ClientId     string            `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	ClientSecret string            `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	Version      string            `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	TenantId     string            `protobuf:"bytes,4,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	Labels       map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AgentHello) Descriptor deprecated

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

Deprecated: Use AgentHello.ProtoReflect.Descriptor instead.

func (*AgentHello) GetClientId

func (x *AgentHello) GetClientId() string

func (*AgentHello) GetClientSecret

func (x *AgentHello) GetClientSecret() string

func (*AgentHello) GetLabels

func (x *AgentHello) GetLabels() map[string]string

func (*AgentHello) GetTenantId

func (x *AgentHello) GetTenantId() string

func (*AgentHello) GetVersion

func (x *AgentHello) GetVersion() string

func (*AgentHello) ProtoMessage

func (*AgentHello) ProtoMessage()

func (*AgentHello) ProtoReflect

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

func (*AgentHello) Reset

func (x *AgentHello) Reset()

func (*AgentHello) String

func (x *AgentHello) String() string

type AgentServiceClient

type AgentServiceClient interface {
	Connect(ctx context.Context, opts ...grpc.CallOption) (AgentService_ConnectClient, error)
}

AgentServiceClient is the client API for AgentService 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.

type AgentServiceServer

type AgentServiceServer interface {
	Connect(AgentService_ConnectServer) error
	// contains filtered or unexported methods
}

AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility

type AgentService_ConnectClient

type AgentService_ConnectClient interface {
	Send(*AgentToServer) error
	Recv() (*ServerToAgent, error)
	grpc.ClientStream
}

type AgentService_ConnectServer

type AgentService_ConnectServer interface {
	Send(*ServerToAgent) error
	Recv() (*AgentToServer, error)
	grpc.ServerStream
}

type AgentToServer

type AgentToServer struct {

	// Types that are assignable to Payload:
	//
	//	*AgentToServer_Hello
	//	*AgentToServer_JobResult
	//	*AgentToServer_Heartbeat
	//	*AgentToServer_Log
	Payload isAgentToServer_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*AgentToServer) Descriptor deprecated

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

Deprecated: Use AgentToServer.ProtoReflect.Descriptor instead.

func (*AgentToServer) GetHeartbeat

func (x *AgentToServer) GetHeartbeat() *Heartbeat

func (*AgentToServer) GetHello

func (x *AgentToServer) GetHello() *AgentHello

func (*AgentToServer) GetJobResult

func (x *AgentToServer) GetJobResult() *JobResult

func (*AgentToServer) GetLog

func (x *AgentToServer) GetLog() *LogEntry

func (*AgentToServer) GetPayload

func (m *AgentToServer) GetPayload() isAgentToServer_Payload

func (*AgentToServer) ProtoMessage

func (*AgentToServer) ProtoMessage()

func (*AgentToServer) ProtoReflect

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

func (*AgentToServer) Reset

func (x *AgentToServer) Reset()

func (*AgentToServer) String

func (x *AgentToServer) String() string

type AgentToServer_Heartbeat

type AgentToServer_Heartbeat struct {
	Heartbeat *Heartbeat `protobuf:"bytes,3,opt,name=heartbeat,proto3,oneof"`
}

type AgentToServer_Hello

type AgentToServer_Hello struct {
	Hello *AgentHello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}

type AgentToServer_JobResult

type AgentToServer_JobResult struct {
	JobResult *JobResult `protobuf:"bytes,2,opt,name=job_result,json=jobResult,proto3,oneof"`
}

type AgentToServer_Log

type AgentToServer_Log struct {
	Log *LogEntry `protobuf:"bytes,4,opt,name=log,proto3,oneof"`
}

type Heartbeat

type Heartbeat struct {
	At       *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=at,proto3" json:"at,omitempty"`
	AgentId  string                 `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	TenantId string                 `protobuf:"bytes,3,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Heartbeat) Descriptor deprecated

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

Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead.

func (*Heartbeat) GetAgentId

func (x *Heartbeat) GetAgentId() string

func (*Heartbeat) GetAt

func (x *Heartbeat) GetAt() *timestamppb.Timestamp

func (*Heartbeat) GetTenantId

func (x *Heartbeat) GetTenantId() string

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) ProtoReflect

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

func (*Heartbeat) Reset

func (x *Heartbeat) Reset()

func (*Heartbeat) String

func (x *Heartbeat) String() string

type JobKind

type JobKind int32
const (
	JobKind_JOB_KIND_UNSPECIFIED   JobKind = 0
	JobKind_JOB_KIND_QUERY         JobKind = 1
	JobKind_JOB_KIND_PING_SERVICE  JobKind = 2
	JobKind_JOB_KIND_PING_DATABASE JobKind = 3
	JobKind_JOB_KIND_CONNECT       JobKind = 4
	JobKind_JOB_KIND_DISCONNECT    JobKind = 5
	JobKind_JOB_KIND_START_JDBC    JobKind = 6
	JobKind_JOB_KIND_STOP_JDBC     JobKind = 7
)

func (JobKind) Descriptor

func (JobKind) Descriptor() protoreflect.EnumDescriptor

func (JobKind) Enum

func (x JobKind) Enum() *JobKind

func (JobKind) EnumDescriptor deprecated

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

Deprecated: Use JobKind.Descriptor instead.

func (JobKind) Number

func (x JobKind) Number() protoreflect.EnumNumber

func (JobKind) String

func (x JobKind) String() string

func (JobKind) Type

func (JobKind) Type() protoreflect.EnumType

type JobRequest

type JobRequest struct {
	JobId      string  `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	Kind       JobKind `protobuf:"varint,2,opt,name=kind,proto3,enum=bridge.JobKind" json:"kind,omitempty"`
	Sql        string  `protobuf:"bytes,3,opt,name=sql,proto3" json:"sql,omitempty"`
	IncludeSrc bool    `protobuf:"varint,4,opt,name=include_src,json=includeSrc,proto3" json:"include_src,omitempty"`
	// contains filtered or unexported fields
}

func (*JobRequest) Descriptor deprecated

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

Deprecated: Use JobRequest.ProtoReflect.Descriptor instead.

func (*JobRequest) GetIncludeSrc

func (x *JobRequest) GetIncludeSrc() bool

func (*JobRequest) GetJobId

func (x *JobRequest) GetJobId() string

func (*JobRequest) GetKind

func (x *JobRequest) GetKind() JobKind

func (*JobRequest) GetSql

func (x *JobRequest) GetSql() string

func (*JobRequest) ProtoMessage

func (*JobRequest) ProtoMessage()

func (*JobRequest) ProtoReflect

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

func (*JobRequest) Reset

func (x *JobRequest) Reset()

func (*JobRequest) String

func (x *JobRequest) String() string

type JobResult

type JobResult struct {
	JobId   string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	Status  Status `protobuf:"varint,2,opt,name=status,proto3,enum=bridge.Status" json:"status,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Rows    []*Row `protobuf:"bytes,4,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*JobResult) Descriptor deprecated

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

Deprecated: Use JobResult.ProtoReflect.Descriptor instead.

func (*JobResult) GetJobId

func (x *JobResult) GetJobId() string

func (*JobResult) GetMessage

func (x *JobResult) GetMessage() string

func (*JobResult) GetRows

func (x *JobResult) GetRows() []*Row

func (*JobResult) GetStatus

func (x *JobResult) GetStatus() Status

func (*JobResult) ProtoMessage

func (*JobResult) ProtoMessage()

func (*JobResult) ProtoReflect

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

func (*JobResult) Reset

func (x *JobResult) Reset()

func (*JobResult) String

func (x *JobResult) String() string

type LogEntry

type LogEntry struct {
	At      *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=at,proto3" json:"at,omitempty"`
	Level   string                 `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"`
	Message string                 `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Fields  map[string]string      `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*LogEntry) Descriptor deprecated

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

Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.

func (*LogEntry) GetAt

func (x *LogEntry) GetAt() *timestamppb.Timestamp

func (*LogEntry) GetFields

func (x *LogEntry) GetFields() map[string]string

func (*LogEntry) GetLevel

func (x *LogEntry) GetLevel() string

func (*LogEntry) GetMessage

func (x *LogEntry) GetMessage() string

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoReflect

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

func (*LogEntry) Reset

func (x *LogEntry) Reset()

func (*LogEntry) String

func (x *LogEntry) String() string

type Row

type Row struct {
	Fields map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Row) Descriptor deprecated

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

Deprecated: Use Row.ProtoReflect.Descriptor instead.

func (*Row) GetFields

func (x *Row) GetFields() map[string]*structpb.Value

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) ProtoReflect

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

func (*Row) Reset

func (x *Row) Reset()

func (*Row) String

func (x *Row) String() string

type ServerToAgent

type ServerToAgent struct {

	// Types that are assignable to Payload:
	//
	//	*ServerToAgent_JobRequest
	Payload isServerToAgent_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*ServerToAgent) Descriptor deprecated

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

Deprecated: Use ServerToAgent.ProtoReflect.Descriptor instead.

func (*ServerToAgent) GetJobRequest

func (x *ServerToAgent) GetJobRequest() *JobRequest

func (*ServerToAgent) GetPayload

func (m *ServerToAgent) GetPayload() isServerToAgent_Payload

func (*ServerToAgent) ProtoMessage

func (*ServerToAgent) ProtoMessage()

func (*ServerToAgent) ProtoReflect

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

func (*ServerToAgent) Reset

func (x *ServerToAgent) Reset()

func (*ServerToAgent) String

func (x *ServerToAgent) String() string

type ServerToAgent_JobRequest

type ServerToAgent_JobRequest struct {
	JobRequest *JobRequest `protobuf:"bytes,1,opt,name=job_request,json=jobRequest,proto3,oneof"`
}

type Status

type Status int32
const (
	Status_STATUS_UNSPECIFIED Status = 0
	Status_STATUS_OK          Status = 1
	Status_STATUS_ERROR       Status = 2
	Status_STATUS_DONE        Status = 3
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedAgentServiceServer

type UnimplementedAgentServiceServer struct {
}

UnimplementedAgentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServiceServer) Connect

type UnsafeAgentServiceServer

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

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

Jump to

Keyboard shortcuts

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