Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNodeControlServer(s grpc.ServiceRegistrar, srv NodeControlServer)
- type AgentMessage
- func (*AgentMessage) Descriptor() ([]byte, []int)deprecated
- func (x *AgentMessage) GetApplyResult() *ApplyResult
- func (x *AgentMessage) GetHeartbeat() *Heartbeat
- func (x *AgentMessage) GetHello() *Hello
- func (x *AgentMessage) GetLogs() *LogChunk
- func (x *AgentMessage) GetPayload() isAgentMessage_Payload
- func (x *AgentMessage) GetUsage() *UsageReport
- func (*AgentMessage) ProtoMessage()
- func (x *AgentMessage) ProtoReflect() protoreflect.Message
- func (x *AgentMessage) Reset()
- func (x *AgentMessage) String() string
- type AgentMessage_ApplyResult
- type AgentMessage_Heartbeat
- type AgentMessage_Hello
- type AgentMessage_Logs
- type AgentMessage_Usage
- type ApplyConfig
- func (*ApplyConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyConfig) GetConfigHash() string
- func (x *ApplyConfig) GetCores() []*CoreConfig
- func (x *ApplyConfig) GetForceRestart() bool
- func (x *ApplyConfig) GetRequestId() string
- func (x *ApplyConfig) GetXrayConfig() []byte
- func (*ApplyConfig) ProtoMessage()
- func (x *ApplyConfig) ProtoReflect() protoreflect.Message
- func (x *ApplyConfig) Reset()
- func (x *ApplyConfig) String() string
- type ApplyResult
- func (*ApplyResult) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyResult) GetConfigHash() string
- func (x *ApplyResult) GetError() string
- func (x *ApplyResult) GetOk() bool
- func (x *ApplyResult) GetRequestId() string
- func (x *ApplyResult) GetXrayVersion() string
- func (*ApplyResult) ProtoMessage()
- func (x *ApplyResult) ProtoReflect() protoreflect.Message
- func (x *ApplyResult) Reset()
- func (x *ApplyResult) String() string
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetKind() Command_Kind
- func (x *Command) GetLogLines() uint32
- func (x *Command) GetRequestId() string
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type Command_Kind
- func (Command_Kind) Descriptor() protoreflect.EnumDescriptor
- func (x Command_Kind) Enum() *Command_Kind
- func (Command_Kind) EnumDescriptor() ([]byte, []int)deprecated
- func (x Command_Kind) Number() protoreflect.EnumNumber
- func (x Command_Kind) String() string
- func (Command_Kind) Type() protoreflect.EnumType
- type CoreConfig
- func (*CoreConfig) Descriptor() ([]byte, []int)deprecated
- func (x *CoreConfig) GetConfig() []byte
- func (x *CoreConfig) GetHash() string
- func (x *CoreConfig) GetKind() string
- func (*CoreConfig) ProtoMessage()
- func (x *CoreConfig) ProtoReflect() protoreflect.Message
- func (x *CoreConfig) Reset()
- func (x *CoreConfig) String() string
- type Heartbeat
- func (*Heartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *Heartbeat) GetConfigHash() string
- func (x *Heartbeat) GetCpuUsagePercent() float64
- func (x *Heartbeat) GetInboundBytes() uint64
- func (x *Heartbeat) GetLoadAvg_1() float64
- func (x *Heartbeat) GetMessage() string
- func (x *Heartbeat) GetOnlineUsers() uint32
- func (x *Heartbeat) GetOutboundBytes() uint64
- func (x *Heartbeat) GetTotalRamBytes() uint64
- func (x *Heartbeat) GetUsedRamBytes() uint64
- func (x *Heartbeat) GetXrayRunning() bool
- func (x *Heartbeat) GetXrayStartedAtUnix() int64
- func (x *Heartbeat) GetXrayVersion() string
- func (*Heartbeat) ProtoMessage()
- func (x *Heartbeat) ProtoReflect() protoreflect.Message
- func (x *Heartbeat) Reset()
- func (x *Heartbeat) String() string
- type Hello
- func (*Hello) Descriptor() ([]byte, []int)deprecated
- func (x *Hello) GetAgentVersion() string
- func (x *Hello) GetConfigHash() string
- func (x *Hello) GetNodeUuid() string
- func (x *Hello) GetSystem() *SystemInfo
- func (x *Hello) GetToken() string
- func (x *Hello) GetXrayVersion() string
- func (*Hello) ProtoMessage()
- func (x *Hello) ProtoReflect() protoreflect.Message
- func (x *Hello) Reset()
- func (x *Hello) String() string
- type HelloAck
- func (*HelloAck) Descriptor() ([]byte, []int)deprecated
- func (x *HelloAck) GetAccepted() bool
- func (x *HelloAck) GetError() string
- func (x *HelloAck) GetHeartbeatIntervalSeconds() uint32
- func (x *HelloAck) GetNodeName() string
- func (x *HelloAck) GetUsageIntervalSeconds() uint32
- func (*HelloAck) ProtoMessage()
- func (x *HelloAck) ProtoReflect() protoreflect.Message
- func (x *HelloAck) Reset()
- func (x *HelloAck) String() string
- type InboundUsage
- func (*InboundUsage) Descriptor() ([]byte, []int)deprecated
- func (x *InboundUsage) GetDownlinkBytes() uint64
- func (x *InboundUsage) GetTag() string
- func (x *InboundUsage) GetUplinkBytes() uint64
- func (*InboundUsage) ProtoMessage()
- func (x *InboundUsage) ProtoReflect() protoreflect.Message
- func (x *InboundUsage) Reset()
- func (x *InboundUsage) String() string
- type LogChunk
- type NodeControlClient
- type NodeControlServer
- type NodeControl_ConnectClient
- type NodeControl_ConnectServer
- type PanelMessage
- func (*PanelMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PanelMessage) GetApplyConfig() *ApplyConfig
- func (x *PanelMessage) GetCommand() *Command
- func (x *PanelMessage) GetHelloAck() *HelloAck
- func (x *PanelMessage) GetPayload() isPanelMessage_Payload
- func (*PanelMessage) ProtoMessage()
- func (x *PanelMessage) ProtoReflect() protoreflect.Message
- func (x *PanelMessage) Reset()
- func (x *PanelMessage) String() string
- type PanelMessage_ApplyConfig
- type PanelMessage_Command
- type PanelMessage_HelloAck
- type SystemInfo
- func (*SystemInfo) Descriptor() ([]byte, []int)deprecated
- func (x *SystemInfo) GetArch() string
- func (x *SystemInfo) GetCpuCount() uint32
- func (x *SystemInfo) GetCpuModel() string
- func (x *SystemInfo) GetHostname() string
- func (x *SystemInfo) GetKernel() string
- func (x *SystemInfo) GetOs() string
- func (x *SystemInfo) GetTotalRamBytes() uint64
- func (*SystemInfo) ProtoMessage()
- func (x *SystemInfo) ProtoReflect() protoreflect.Message
- func (x *SystemInfo) Reset()
- func (x *SystemInfo) String() string
- type UnimplementedNodeControlServer
- type UnsafeNodeControlServer
- type UsageReport
- func (*UsageReport) Descriptor() ([]byte, []int)deprecated
- func (x *UsageReport) GetCollectedAtUnix() int64
- func (x *UsageReport) GetInbounds() []*InboundUsage
- func (x *UsageReport) GetUsers() []*UserUsage
- func (*UsageReport) ProtoMessage()
- func (x *UsageReport) ProtoReflect() protoreflect.Message
- func (x *UsageReport) Reset()
- func (x *UsageReport) String() string
- type UserUsage
- func (*UserUsage) Descriptor() ([]byte, []int)deprecated
- func (x *UserUsage) GetDownlinkBytes() uint64
- func (x *UserUsage) GetEmail() string
- func (x *UserUsage) GetOnline() bool
- func (x *UserUsage) GetUplinkBytes() uint64
- func (*UserUsage) ProtoMessage()
- func (x *UserUsage) ProtoReflect() protoreflect.Message
- func (x *UserUsage) Reset()
- func (x *UserUsage) String() string
Constants ¶
const (
NodeControl_Connect_FullMethodName = "/node.v1.NodeControl/Connect"
)
Variables ¶
var ( Command_Kind_name = map[int32]string{ 0: "KIND_UNSPECIFIED", 1: "KIND_RESTART_XRAY", 2: "KIND_STOP_XRAY", 3: "KIND_START_XRAY", 4: "KIND_FETCH_LOGS", 5: "KIND_PING", } Command_Kind_value = map[string]int32{ "KIND_UNSPECIFIED": 0, "KIND_RESTART_XRAY": 1, "KIND_STOP_XRAY": 2, "KIND_START_XRAY": 3, "KIND_FETCH_LOGS": 4, "KIND_PING": 5, } )
Enum value maps for Command_Kind.
var File_node_v1_node_proto protoreflect.FileDescriptor
var NodeControl_ServiceDesc = grpc.ServiceDesc{ ServiceName: "node.v1.NodeControl", HandlerType: (*NodeControlServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Connect", Handler: _NodeControl_Connect_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "node/v1/node.proto", }
NodeControl_ServiceDesc is the grpc.ServiceDesc for NodeControl service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNodeControlServer ¶
func RegisterNodeControlServer(s grpc.ServiceRegistrar, srv NodeControlServer)
Types ¶
type AgentMessage ¶
type AgentMessage struct {
// Types that are valid to be assigned to Payload:
//
// *AgentMessage_Hello
// *AgentMessage_Heartbeat
// *AgentMessage_ApplyResult
// *AgentMessage_Usage
// *AgentMessage_Logs
Payload isAgentMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
func (*AgentMessage) Descriptor
deprecated
func (*AgentMessage) Descriptor() ([]byte, []int)
Deprecated: Use AgentMessage.ProtoReflect.Descriptor instead.
func (*AgentMessage) GetApplyResult ¶
func (x *AgentMessage) GetApplyResult() *ApplyResult
func (*AgentMessage) GetHeartbeat ¶
func (x *AgentMessage) GetHeartbeat() *Heartbeat
func (*AgentMessage) GetHello ¶
func (x *AgentMessage) GetHello() *Hello
func (*AgentMessage) GetLogs ¶
func (x *AgentMessage) GetLogs() *LogChunk
func (*AgentMessage) GetPayload ¶
func (x *AgentMessage) GetPayload() isAgentMessage_Payload
func (*AgentMessage) GetUsage ¶
func (x *AgentMessage) GetUsage() *UsageReport
func (*AgentMessage) ProtoMessage ¶
func (*AgentMessage) ProtoMessage()
func (*AgentMessage) ProtoReflect ¶
func (x *AgentMessage) ProtoReflect() protoreflect.Message
func (*AgentMessage) Reset ¶
func (x *AgentMessage) Reset()
func (*AgentMessage) String ¶
func (x *AgentMessage) String() string
type AgentMessage_ApplyResult ¶
type AgentMessage_ApplyResult struct {
ApplyResult *ApplyResult `protobuf:"bytes,3,opt,name=apply_result,json=applyResult,proto3,oneof"`
}
type AgentMessage_Heartbeat ¶
type AgentMessage_Heartbeat struct {
Heartbeat *Heartbeat `protobuf:"bytes,2,opt,name=heartbeat,proto3,oneof"`
}
type AgentMessage_Hello ¶
type AgentMessage_Hello struct {
Hello *Hello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}
type AgentMessage_Logs ¶
type AgentMessage_Logs struct {
Logs *LogChunk `protobuf:"bytes,5,opt,name=logs,proto3,oneof"`
}
type AgentMessage_Usage ¶
type AgentMessage_Usage struct {
Usage *UsageReport `protobuf:"bytes,4,opt,name=usage,proto3,oneof"`
}
type ApplyConfig ¶
type ApplyConfig struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// Full xray-core configuration document, JSON encoded.
//
// Kept as its own field rather than folded into `cores` so an agent built
// before multi-core support keeps working unchanged: it reads this and
// ignores what it does not know. A panel talking to such an agent still gets
// a working xray node.
XrayConfig []byte `protobuf:"bytes,2,opt,name=xray_config,json=xrayConfig,proto3" json:"xray_config,omitempty"`
ConfigHash string `protobuf:"bytes,3,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
// Restart the cores even when the hash did not change.
ForceRestart bool `protobuf:"varint,4,opt,name=force_restart,json=forceRestart,proto3" json:"force_restart,omitempty"`
// Every core this node should run. An agent that understands this field uses
// it and ignores xray_config, which the panel also fills for the older ones.
Cores []*CoreConfig `protobuf:"bytes,5,rep,name=cores,proto3" json:"cores,omitempty"`
// contains filtered or unexported fields
}
func (*ApplyConfig) Descriptor
deprecated
func (*ApplyConfig) Descriptor() ([]byte, []int)
Deprecated: Use ApplyConfig.ProtoReflect.Descriptor instead.
func (*ApplyConfig) GetConfigHash ¶
func (x *ApplyConfig) GetConfigHash() string
func (*ApplyConfig) GetCores ¶ added in v0.11.0
func (x *ApplyConfig) GetCores() []*CoreConfig
func (*ApplyConfig) GetForceRestart ¶
func (x *ApplyConfig) GetForceRestart() bool
func (*ApplyConfig) GetRequestId ¶
func (x *ApplyConfig) GetRequestId() string
func (*ApplyConfig) GetXrayConfig ¶
func (x *ApplyConfig) GetXrayConfig() []byte
func (*ApplyConfig) ProtoMessage ¶
func (*ApplyConfig) ProtoMessage()
func (*ApplyConfig) ProtoReflect ¶
func (x *ApplyConfig) ProtoReflect() protoreflect.Message
func (*ApplyConfig) Reset ¶
func (x *ApplyConfig) Reset()
func (*ApplyConfig) String ¶
func (x *ApplyConfig) String() string
type ApplyResult ¶
type ApplyResult struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Ok bool `protobuf:"varint,2,opt,name=ok,proto3" json:"ok,omitempty"`
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
ConfigHash string `protobuf:"bytes,4,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
XrayVersion string `protobuf:"bytes,5,opt,name=xray_version,json=xrayVersion,proto3" json:"xray_version,omitempty"`
// contains filtered or unexported fields
}
func (*ApplyResult) Descriptor
deprecated
func (*ApplyResult) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResult.ProtoReflect.Descriptor instead.
func (*ApplyResult) GetConfigHash ¶
func (x *ApplyResult) GetConfigHash() string
func (*ApplyResult) GetError ¶
func (x *ApplyResult) GetError() string
func (*ApplyResult) GetOk ¶
func (x *ApplyResult) GetOk() bool
func (*ApplyResult) GetRequestId ¶
func (x *ApplyResult) GetRequestId() string
func (*ApplyResult) GetXrayVersion ¶
func (x *ApplyResult) GetXrayVersion() string
func (*ApplyResult) ProtoMessage ¶
func (*ApplyResult) ProtoMessage()
func (*ApplyResult) ProtoReflect ¶
func (x *ApplyResult) ProtoReflect() protoreflect.Message
func (*ApplyResult) Reset ¶
func (x *ApplyResult) Reset()
func (*ApplyResult) String ¶
func (x *ApplyResult) String() string
type Command ¶
type Command struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Kind Command_Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=node.v1.Command_Kind" json:"kind,omitempty"`
LogLines uint32 `protobuf:"varint,3,opt,name=log_lines,json=logLines,proto3" json:"log_lines,omitempty"`
// contains filtered or unexported fields
}
func (*Command) Descriptor
deprecated
func (*Command) GetKind ¶
func (x *Command) GetKind() Command_Kind
func (*Command) GetLogLines ¶
func (*Command) GetRequestId ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Command_Kind ¶
type Command_Kind int32
const ( Command_KIND_UNSPECIFIED Command_Kind = 0 Command_KIND_RESTART_XRAY Command_Kind = 1 Command_KIND_STOP_XRAY Command_Kind = 2 Command_KIND_START_XRAY Command_Kind = 3 Command_KIND_FETCH_LOGS Command_Kind = 4 Command_KIND_PING Command_Kind = 5 )
func (Command_Kind) Descriptor ¶
func (Command_Kind) Descriptor() protoreflect.EnumDescriptor
func (Command_Kind) Enum ¶
func (x Command_Kind) Enum() *Command_Kind
func (Command_Kind) EnumDescriptor
deprecated
func (Command_Kind) EnumDescriptor() ([]byte, []int)
Deprecated: Use Command_Kind.Descriptor instead.
func (Command_Kind) Number ¶
func (x Command_Kind) Number() protoreflect.EnumNumber
func (Command_Kind) String ¶
func (x Command_Kind) String() string
func (Command_Kind) Type ¶
func (Command_Kind) Type() protoreflect.EnumType
type CoreConfig ¶ added in v0.11.0
type CoreConfig struct {
// "xray" or "hysteria2". A kind the agent does not recognise is skipped with
// a reported error rather than guessed at — running the wrong binary on a
// document is worse than not running it.
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// The rendered document, exactly as it should be written to disk.
Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
// Hash of `config`, so the agent can skip a restart that changes nothing.
Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
// contains filtered or unexported fields
}
CoreConfig is one proxy engine the node supervises.
func (*CoreConfig) Descriptor
deprecated
added in
v0.11.0
func (*CoreConfig) Descriptor() ([]byte, []int)
Deprecated: Use CoreConfig.ProtoReflect.Descriptor instead.
func (*CoreConfig) GetConfig ¶ added in v0.11.0
func (x *CoreConfig) GetConfig() []byte
func (*CoreConfig) GetHash ¶ added in v0.11.0
func (x *CoreConfig) GetHash() string
func (*CoreConfig) GetKind ¶ added in v0.11.0
func (x *CoreConfig) GetKind() string
func (*CoreConfig) ProtoMessage ¶ added in v0.11.0
func (*CoreConfig) ProtoMessage()
func (*CoreConfig) ProtoReflect ¶ added in v0.11.0
func (x *CoreConfig) ProtoReflect() protoreflect.Message
func (*CoreConfig) Reset ¶ added in v0.11.0
func (x *CoreConfig) Reset()
func (*CoreConfig) String ¶ added in v0.11.0
func (x *CoreConfig) String() string
type Heartbeat ¶
type Heartbeat struct {
XrayRunning bool `protobuf:"varint,1,opt,name=xray_running,json=xrayRunning,proto3" json:"xray_running,omitempty"`
XrayStartedAtUnix int64 `protobuf:"varint,2,opt,name=xray_started_at_unix,json=xrayStartedAtUnix,proto3" json:"xray_started_at_unix,omitempty"`
XrayVersion string `protobuf:"bytes,3,opt,name=xray_version,json=xrayVersion,proto3" json:"xray_version,omitempty"`
ConfigHash string `protobuf:"bytes,4,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
CpuUsagePercent float64 `protobuf:"fixed64,5,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"`
UsedRamBytes uint64 `protobuf:"varint,6,opt,name=used_ram_bytes,json=usedRamBytes,proto3" json:"used_ram_bytes,omitempty"`
TotalRamBytes uint64 `protobuf:"varint,7,opt,name=total_ram_bytes,json=totalRamBytes,proto3" json:"total_ram_bytes,omitempty"`
LoadAvg_1 float64 `protobuf:"fixed64,8,opt,name=load_avg_1,json=loadAvg1,proto3" json:"load_avg_1,omitempty"`
InboundBytes uint64 `protobuf:"varint,9,opt,name=inbound_bytes,json=inboundBytes,proto3" json:"inbound_bytes,omitempty"`
OutboundBytes uint64 `protobuf:"varint,10,opt,name=outbound_bytes,json=outboundBytes,proto3" json:"outbound_bytes,omitempty"`
OnlineUsers uint32 `protobuf:"varint,11,opt,name=online_users,json=onlineUsers,proto3" json:"online_users,omitempty"`
Message string `protobuf:"bytes,12,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) GetConfigHash ¶
func (*Heartbeat) GetCpuUsagePercent ¶
func (*Heartbeat) GetInboundBytes ¶
func (*Heartbeat) GetLoadAvg_1 ¶
func (*Heartbeat) GetMessage ¶
func (*Heartbeat) GetOnlineUsers ¶
func (*Heartbeat) GetOutboundBytes ¶
func (*Heartbeat) GetTotalRamBytes ¶
func (*Heartbeat) GetUsedRamBytes ¶
func (*Heartbeat) GetXrayRunning ¶
func (*Heartbeat) GetXrayStartedAtUnix ¶
func (*Heartbeat) GetXrayVersion ¶
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type Hello ¶
type Hello struct {
NodeUuid string `protobuf:"bytes,1,opt,name=node_uuid,json=nodeUuid,proto3" json:"node_uuid,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
AgentVersion string `protobuf:"bytes,3,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"`
XrayVersion string `protobuf:"bytes,4,opt,name=xray_version,json=xrayVersion,proto3" json:"xray_version,omitempty"`
System *SystemInfo `protobuf:"bytes,5,opt,name=system,proto3" json:"system,omitempty"`
// Hash of the xray config the agent currently runs, empty when nothing applied.
ConfigHash string `protobuf:"bytes,6,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
// contains filtered or unexported fields
}
func (*Hello) Descriptor
deprecated
func (*Hello) GetAgentVersion ¶
func (*Hello) GetConfigHash ¶
func (*Hello) GetNodeUuid ¶
func (*Hello) GetSystem ¶
func (x *Hello) GetSystem() *SystemInfo
func (*Hello) GetXrayVersion ¶
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
type HelloAck ¶
type HelloAck struct {
Accepted bool `protobuf:"varint,1,opt,name=accepted,proto3" json:"accepted,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
// How often the agent should send a heartbeat.
HeartbeatIntervalSeconds uint32 `` /* 136-byte string literal not displayed */
// How often the agent should report traffic usage.
UsageIntervalSeconds uint32 `protobuf:"varint,5,opt,name=usage_interval_seconds,json=usageIntervalSeconds,proto3" json:"usage_interval_seconds,omitempty"`
// contains filtered or unexported fields
}
func (*HelloAck) Descriptor
deprecated
func (*HelloAck) GetAccepted ¶
func (*HelloAck) GetHeartbeatIntervalSeconds ¶
func (*HelloAck) GetNodeName ¶
func (*HelloAck) GetUsageIntervalSeconds ¶
func (*HelloAck) ProtoMessage ¶
func (*HelloAck) ProtoMessage()
func (*HelloAck) ProtoReflect ¶
func (x *HelloAck) ProtoReflect() protoreflect.Message
type InboundUsage ¶
type InboundUsage struct {
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
UplinkBytes uint64 `protobuf:"varint,2,opt,name=uplink_bytes,json=uplinkBytes,proto3" json:"uplink_bytes,omitempty"`
DownlinkBytes uint64 `protobuf:"varint,3,opt,name=downlink_bytes,json=downlinkBytes,proto3" json:"downlink_bytes,omitempty"`
// contains filtered or unexported fields
}
func (*InboundUsage) Descriptor
deprecated
func (*InboundUsage) Descriptor() ([]byte, []int)
Deprecated: Use InboundUsage.ProtoReflect.Descriptor instead.
func (*InboundUsage) GetDownlinkBytes ¶
func (x *InboundUsage) GetDownlinkBytes() uint64
func (*InboundUsage) GetTag ¶
func (x *InboundUsage) GetTag() string
func (*InboundUsage) GetUplinkBytes ¶
func (x *InboundUsage) GetUplinkBytes() uint64
func (*InboundUsage) ProtoMessage ¶
func (*InboundUsage) ProtoMessage()
func (*InboundUsage) ProtoReflect ¶
func (x *InboundUsage) ProtoReflect() protoreflect.Message
func (*InboundUsage) Reset ¶
func (x *InboundUsage) Reset()
func (*InboundUsage) String ¶
func (x *InboundUsage) String() string
type LogChunk ¶
type LogChunk struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Lines []string `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"`
// contains filtered or unexported fields
}
func (*LogChunk) Descriptor
deprecated
func (*LogChunk) GetRequestId ¶
func (*LogChunk) ProtoMessage ¶
func (*LogChunk) ProtoMessage()
func (*LogChunk) ProtoReflect ¶
func (x *LogChunk) ProtoReflect() protoreflect.Message
type NodeControlClient ¶
type NodeControlClient interface {
Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AgentMessage, PanelMessage], error)
}
NodeControlClient is the client API for NodeControl 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.
NodeControl is the control-plane contract between the panel and a node agent. The agent always dials the panel and keeps a single bidirectional stream open, so nodes only need outbound connectivity and never expose an inbound port.
func NewNodeControlClient ¶
func NewNodeControlClient(cc grpc.ClientConnInterface) NodeControlClient
type NodeControlServer ¶
type NodeControlServer interface {
Connect(grpc.BidiStreamingServer[AgentMessage, PanelMessage]) error
// contains filtered or unexported methods
}
NodeControlServer is the server API for NodeControl service. All implementations must embed UnimplementedNodeControlServer for forward compatibility.
NodeControl is the control-plane contract between the panel and a node agent. The agent always dials the panel and keeps a single bidirectional stream open, so nodes only need outbound connectivity and never expose an inbound port.
type NodeControl_ConnectClient ¶
type NodeControl_ConnectClient = grpc.BidiStreamingClient[AgentMessage, PanelMessage]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeControl_ConnectServer ¶
type NodeControl_ConnectServer = grpc.BidiStreamingServer[AgentMessage, PanelMessage]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PanelMessage ¶
type PanelMessage struct {
// Types that are valid to be assigned to Payload:
//
// *PanelMessage_HelloAck
// *PanelMessage_ApplyConfig
// *PanelMessage_Command
Payload isPanelMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
func (*PanelMessage) Descriptor
deprecated
func (*PanelMessage) Descriptor() ([]byte, []int)
Deprecated: Use PanelMessage.ProtoReflect.Descriptor instead.
func (*PanelMessage) GetApplyConfig ¶
func (x *PanelMessage) GetApplyConfig() *ApplyConfig
func (*PanelMessage) GetCommand ¶
func (x *PanelMessage) GetCommand() *Command
func (*PanelMessage) GetHelloAck ¶
func (x *PanelMessage) GetHelloAck() *HelloAck
func (*PanelMessage) GetPayload ¶
func (x *PanelMessage) GetPayload() isPanelMessage_Payload
func (*PanelMessage) ProtoMessage ¶
func (*PanelMessage) ProtoMessage()
func (*PanelMessage) ProtoReflect ¶
func (x *PanelMessage) ProtoReflect() protoreflect.Message
func (*PanelMessage) Reset ¶
func (x *PanelMessage) Reset()
func (*PanelMessage) String ¶
func (x *PanelMessage) String() string
type PanelMessage_ApplyConfig ¶
type PanelMessage_ApplyConfig struct {
ApplyConfig *ApplyConfig `protobuf:"bytes,2,opt,name=apply_config,json=applyConfig,proto3,oneof"`
}
type PanelMessage_Command ¶
type PanelMessage_Command struct {
Command *Command `protobuf:"bytes,3,opt,name=command,proto3,oneof"`
}
type PanelMessage_HelloAck ¶
type PanelMessage_HelloAck struct {
HelloAck *HelloAck `protobuf:"bytes,1,opt,name=hello_ack,json=helloAck,proto3,oneof"`
}
type SystemInfo ¶
type SystemInfo struct {
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"`
Kernel string `protobuf:"bytes,4,opt,name=kernel,proto3" json:"kernel,omitempty"`
CpuCount uint32 `protobuf:"varint,5,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"`
CpuModel string `protobuf:"bytes,6,opt,name=cpu_model,json=cpuModel,proto3" json:"cpu_model,omitempty"`
TotalRamBytes uint64 `protobuf:"varint,7,opt,name=total_ram_bytes,json=totalRamBytes,proto3" json:"total_ram_bytes,omitempty"`
// contains filtered or unexported fields
}
func (*SystemInfo) Descriptor
deprecated
func (*SystemInfo) Descriptor() ([]byte, []int)
Deprecated: Use SystemInfo.ProtoReflect.Descriptor instead.
func (*SystemInfo) GetArch ¶
func (x *SystemInfo) GetArch() string
func (*SystemInfo) GetCpuCount ¶
func (x *SystemInfo) GetCpuCount() uint32
func (*SystemInfo) GetCpuModel ¶
func (x *SystemInfo) GetCpuModel() string
func (*SystemInfo) GetHostname ¶
func (x *SystemInfo) GetHostname() string
func (*SystemInfo) GetKernel ¶
func (x *SystemInfo) GetKernel() string
func (*SystemInfo) GetOs ¶
func (x *SystemInfo) GetOs() string
func (*SystemInfo) GetTotalRamBytes ¶
func (x *SystemInfo) GetTotalRamBytes() uint64
func (*SystemInfo) ProtoMessage ¶
func (*SystemInfo) ProtoMessage()
func (*SystemInfo) ProtoReflect ¶
func (x *SystemInfo) ProtoReflect() protoreflect.Message
func (*SystemInfo) Reset ¶
func (x *SystemInfo) Reset()
func (*SystemInfo) String ¶
func (x *SystemInfo) String() string
type UnimplementedNodeControlServer ¶
type UnimplementedNodeControlServer struct{}
UnimplementedNodeControlServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNodeControlServer) Connect ¶
func (UnimplementedNodeControlServer) Connect(grpc.BidiStreamingServer[AgentMessage, PanelMessage]) error
type UnsafeNodeControlServer ¶
type UnsafeNodeControlServer interface {
// contains filtered or unexported methods
}
UnsafeNodeControlServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeControlServer will result in compilation errors.
type UsageReport ¶
type UsageReport struct {
CollectedAtUnix int64 `protobuf:"varint,1,opt,name=collected_at_unix,json=collectedAtUnix,proto3" json:"collected_at_unix,omitempty"`
Users []*UserUsage `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"`
Inbounds []*InboundUsage `protobuf:"bytes,3,rep,name=inbounds,proto3" json:"inbounds,omitempty"`
// contains filtered or unexported fields
}
func (*UsageReport) Descriptor
deprecated
func (*UsageReport) Descriptor() ([]byte, []int)
Deprecated: Use UsageReport.ProtoReflect.Descriptor instead.
func (*UsageReport) GetCollectedAtUnix ¶
func (x *UsageReport) GetCollectedAtUnix() int64
func (*UsageReport) GetInbounds ¶
func (x *UsageReport) GetInbounds() []*InboundUsage
func (*UsageReport) GetUsers ¶
func (x *UsageReport) GetUsers() []*UserUsage
func (*UsageReport) ProtoMessage ¶
func (*UsageReport) ProtoMessage()
func (*UsageReport) ProtoReflect ¶
func (x *UsageReport) ProtoReflect() protoreflect.Message
func (*UsageReport) Reset ¶
func (x *UsageReport) Reset()
func (*UsageReport) String ¶
func (x *UsageReport) String() string
type UserUsage ¶
type UserUsage struct {
// Xray stats email, formatted as "<user-uuid>.<username>" by the panel.
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
UplinkBytes uint64 `protobuf:"varint,2,opt,name=uplink_bytes,json=uplinkBytes,proto3" json:"uplink_bytes,omitempty"`
DownlinkBytes uint64 `protobuf:"varint,3,opt,name=downlink_bytes,json=downlinkBytes,proto3" json:"downlink_bytes,omitempty"`
Online bool `protobuf:"varint,4,opt,name=online,proto3" json:"online,omitempty"`
// contains filtered or unexported fields
}
func (*UserUsage) Descriptor
deprecated
func (*UserUsage) GetDownlinkBytes ¶
func (*UserUsage) GetUplinkBytes ¶
func (*UserUsage) ProtoMessage ¶
func (*UserUsage) ProtoMessage()
func (*UserUsage) ProtoReflect ¶
func (x *UserUsage) ProtoReflect() protoreflect.Message