Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterConfigSyncServiceServer(s grpc.ServiceRegistrar, srv ConfigSyncServiceServer)
- func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
- func RegisterNodeLogServiceServer(s grpc.ServiceRegistrar, srv NodeLogServiceServer)
- func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)
- func RegisterTrafficServiceServer(s grpc.ServiceRegistrar, srv TrafficServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type BaseConfig
- func (*BaseConfig) Descriptor() ([]byte, []int)deprecated
- func (x *BaseConfig) GetPullInterval() int32
- func (x *BaseConfig) GetPushInterval() int32
- func (*BaseConfig) ProtoMessage()
- func (x *BaseConfig) ProtoReflect() protoreflect.Message
- func (x *BaseConfig) Reset()
- func (x *BaseConfig) String() string
- type ConfigChangeNotification
- func (*ConfigChangeNotification) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigChangeNotification) GetNodeId() uint32
- func (x *ConfigChangeNotification) GetPayload() []byte
- func (x *ConfigChangeNotification) GetTimestamp() int64
- func (x *ConfigChangeNotification) GetType() ConfigChangeNotification_ChangeType
- func (*ConfigChangeNotification) ProtoMessage()
- func (x *ConfigChangeNotification) ProtoReflect() protoreflect.Message
- func (x *ConfigChangeNotification) Reset()
- func (x *ConfigChangeNotification) String() string
- type ConfigChangeNotification_ChangeType
- func (ConfigChangeNotification_ChangeType) Descriptor() protoreflect.EnumDescriptor
- func (x ConfigChangeNotification_ChangeType) Enum() *ConfigChangeNotification_ChangeType
- func (ConfigChangeNotification_ChangeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ConfigChangeNotification_ChangeType) Number() protoreflect.EnumNumber
- func (x ConfigChangeNotification_ChangeType) String() string
- func (ConfigChangeNotification_ChangeType) Type() protoreflect.EnumType
- type ConfigSyncRequest
- func (*ConfigSyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigSyncRequest) GetLastSyncTime() int64
- func (x *ConfigSyncRequest) GetNodeId() uint32
- func (*ConfigSyncRequest) ProtoMessage()
- func (x *ConfigSyncRequest) ProtoReflect() protoreflect.Message
- func (x *ConfigSyncRequest) Reset()
- func (x *ConfigSyncRequest) String() string
- type ConfigSyncResponse
- func (*ConfigSyncResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigSyncResponse) GetConfig() *NodeConfigResponse
- func (x *ConfigSyncResponse) GetHasChanges() bool
- func (x *ConfigSyncResponse) GetSyncTime() int64
- func (x *ConfigSyncResponse) GetUsers() []*UserInfo
- func (*ConfigSyncResponse) ProtoMessage()
- func (x *ConfigSyncResponse) ProtoReflect() protoreflect.Message
- func (x *ConfigSyncResponse) Reset()
- func (x *ConfigSyncResponse) String() string
- type ConfigSyncServiceClient
- type ConfigSyncServiceServer
- type ConfigSyncService_ConfigChangesClient
- type ConfigSyncService_ConfigChangesServer
- type Empty
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckRequest) GetNodeId() uint32
- func (x *HealthCheckRequest) GetVersion() string
- func (*HealthCheckRequest) ProtoMessage()
- func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
- func (x *HealthCheckRequest) Reset()
- func (x *HealthCheckRequest) String() string
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckResponse) GetServerVersion() string
- func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (x *HealthCheckResponse) GetTimestamp() int64
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- type HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
- func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
- func (x HealthCheckResponse_ServingStatus) String() string
- func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
- type HealthServiceClient
- type HealthServiceServer
- type HealthService_WatchClient
- type HealthService_WatchServer
- type NodeConfigRequest
- type NodeConfigResponse
- func (*NodeConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NodeConfigResponse) GetBaseConfig() *BaseConfig
- func (x *NodeConfigResponse) GetCipher() string
- func (x *NodeConfigResponse) GetExtra() map[string]string
- func (x *NodeConfigResponse) GetFlow() string
- func (x *NodeConfigResponse) GetHost() string
- func (x *NodeConfigResponse) GetNetwork() string
- func (x *NodeConfigResponse) GetNetworkSettings() map[string]string
- func (x *NodeConfigResponse) GetNodeType() string
- func (x *NodeConfigResponse) GetRoutes() []*Route
- func (x *NodeConfigResponse) GetSendThrough() string
- func (x *NodeConfigResponse) GetServerKey() string
- func (x *NodeConfigResponse) GetServerName() string
- func (x *NodeConfigResponse) GetServerPort() int32
- func (x *NodeConfigResponse) GetTls() int32
- func (x *NodeConfigResponse) GetTlsSettings() map[string]string
- func (x *NodeConfigResponse) GetType() string
- func (*NodeConfigResponse) ProtoMessage()
- func (x *NodeConfigResponse) ProtoReflect() protoreflect.Message
- func (x *NodeConfigResponse) Reset()
- func (x *NodeConfigResponse) String() string
- type NodeLogBatchRequest
- func (*NodeLogBatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NodeLogBatchRequest) GetLogs() []*NodeLogEntry
- func (x *NodeLogBatchRequest) GetNodeId() uint32
- func (*NodeLogBatchRequest) ProtoMessage()
- func (x *NodeLogBatchRequest) ProtoReflect() protoreflect.Message
- func (x *NodeLogBatchRequest) Reset()
- func (x *NodeLogBatchRequest) String() string
- type NodeLogEntry
- func (*NodeLogEntry) Descriptor() ([]byte, []int)deprecated
- func (x *NodeLogEntry) GetFieldsJson() string
- func (x *NodeLogEntry) GetLevel() string
- func (x *NodeLogEntry) GetMessage() string
- func (x *NodeLogEntry) GetSource() string
- func (x *NodeLogEntry) GetTimestamp() int64
- func (x *NodeLogEntry) GetTraceId() string
- func (*NodeLogEntry) ProtoMessage()
- func (x *NodeLogEntry) ProtoReflect() protoreflect.Message
- func (x *NodeLogEntry) Reset()
- func (x *NodeLogEntry) String() string
- type NodeLogServiceClient
- type NodeLogServiceServer
- type NodeRegisterRequest
- func (*NodeRegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NodeRegisterRequest) GetAuthKey() string
- func (x *NodeRegisterRequest) GetHost() string
- func (x *NodeRegisterRequest) GetName() string
- func (x *NodeRegisterRequest) GetPort() int32
- func (x *NodeRegisterRequest) GetServerOs() string
- func (x *NodeRegisterRequest) GetServerVersion() string
- func (x *NodeRegisterRequest) GetSupportedProtocols() []string
- func (*NodeRegisterRequest) ProtoMessage()
- func (x *NodeRegisterRequest) ProtoReflect() protoreflect.Message
- func (x *NodeRegisterRequest) Reset()
- func (x *NodeRegisterRequest) String() string
- type NodeRegisterResponse
- func (*NodeRegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NodeRegisterResponse) GetApiKey() string
- func (x *NodeRegisterResponse) GetMessage() string
- func (x *NodeRegisterResponse) GetNodeId() uint32
- func (x *NodeRegisterResponse) GetSecret() string
- func (*NodeRegisterResponse) ProtoMessage()
- func (x *NodeRegisterResponse) ProtoReflect() protoreflect.Message
- func (x *NodeRegisterResponse) Reset()
- func (x *NodeRegisterResponse) String() string
- type NodeServiceClient
- type NodeServiceServer
- type NodeService_StatusStreamClient
- type NodeService_StatusStreamServer
- type NodeStatusRequest
- func (*NodeStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NodeStatusRequest) GetCpuUsage() float64
- func (x *NodeStatusRequest) GetDiskUsage() float64
- func (x *NodeStatusRequest) GetDownload() int64
- func (x *NodeStatusRequest) GetMemoryUsage() float64
- func (x *NodeStatusRequest) GetNodeId() uint32
- func (x *NodeStatusRequest) GetOnlineUsers() int32
- func (x *NodeStatusRequest) GetUpload() int64
- func (x *NodeStatusRequest) GetUptime() int64
- func (*NodeStatusRequest) ProtoMessage()
- func (x *NodeStatusRequest) ProtoReflect() protoreflect.Message
- func (x *NodeStatusRequest) Reset()
- func (x *NodeStatusRequest) String() string
- type OnlineData
- type OnlineReportRequest
- func (*OnlineReportRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OnlineReportRequest) GetNodeId() uint32
- func (x *OnlineReportRequest) GetOnline() map[uint32]*OnlineData
- func (*OnlineReportRequest) ProtoMessage()
- func (x *OnlineReportRequest) ProtoReflect() protoreflect.Message
- func (x *OnlineReportRequest) Reset()
- func (x *OnlineReportRequest) String() string
- type Route
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetCode() int32
- func (x *StatusResponse) GetMessage() string
- func (x *StatusResponse) GetSuccess() bool
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- type TrafficData
- func (*TrafficData) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficData) GetDownload() int64
- func (x *TrafficData) GetUpload() int64
- func (*TrafficData) ProtoMessage()
- func (x *TrafficData) ProtoReflect() protoreflect.Message
- func (x *TrafficData) Reset()
- func (x *TrafficData) String() string
- type TrafficReportRequest
- func (*TrafficReportRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficReportRequest) GetNodeId() uint32
- func (x *TrafficReportRequest) GetTraffics() map[uint32]*TrafficData
- func (*TrafficReportRequest) ProtoMessage()
- func (x *TrafficReportRequest) ProtoReflect() protoreflect.Message
- func (x *TrafficReportRequest) Reset()
- func (x *TrafficReportRequest) String() string
- type TrafficReportResponse
- func (*TrafficReportResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficReportResponse) GetBalances() map[uint32]int64
- func (x *TrafficReportResponse) GetMessage() string
- func (x *TrafficReportResponse) GetSuccess() bool
- func (*TrafficReportResponse) ProtoMessage()
- func (x *TrafficReportResponse) ProtoReflect() protoreflect.Message
- func (x *TrafficReportResponse) Reset()
- func (x *TrafficReportResponse) String() string
- type TrafficServiceClient
- type TrafficServiceServer
- type TrafficService_OnlineStreamClient
- type TrafficService_OnlineStreamServer
- type TrafficService_TrafficStreamClient
- type TrafficService_TrafficStreamServer
- type UnimplementedConfigSyncServiceServer
- func (UnimplementedConfigSyncServiceServer) ConfigChanges(grpc.BidiStreamingServer[ConfigChangeNotification, StatusResponse]) error
- func (UnimplementedConfigSyncServiceServer) FullSync(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
- func (UnimplementedConfigSyncServiceServer) SyncConfig(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
- type UnimplementedHealthServiceServer
- type UnimplementedNodeLogServiceServer
- type UnimplementedNodeServiceServer
- func (UnimplementedNodeServiceServer) GetConfig(context.Context, *NodeConfigRequest) (*NodeConfigResponse, error)
- func (UnimplementedNodeServiceServer) Register(context.Context, *NodeRegisterRequest) (*NodeRegisterResponse, error)
- func (UnimplementedNodeServiceServer) ReportStatus(context.Context, *NodeStatusRequest) (*StatusResponse, error)
- func (UnimplementedNodeServiceServer) StatusStream(grpc.BidiStreamingServer[NodeStatusRequest, NodeConfigResponse]) error
- type UnimplementedTrafficServiceServer
- func (UnimplementedTrafficServiceServer) OnlineStream(grpc.BidiStreamingServer[OnlineReportRequest, StatusResponse]) error
- func (UnimplementedTrafficServiceServer) ReportOnline(context.Context, *OnlineReportRequest) (*StatusResponse, error)
- func (UnimplementedTrafficServiceServer) ReportTraffic(context.Context, *TrafficReportRequest) (*TrafficReportResponse, error)
- func (UnimplementedTrafficServiceServer) TrafficStream(grpc.BidiStreamingServer[TrafficReportRequest, TrafficReportResponse]) error
- type UnimplementedUserServiceServer
- type UnsafeConfigSyncServiceServer
- type UnsafeHealthServiceServer
- type UnsafeNodeLogServiceServer
- type UnsafeNodeServiceServer
- type UnsafeTrafficServiceServer
- type UnsafeUserServiceServer
- type UserChangeNotification
- func (*UserChangeNotification) Descriptor() ([]byte, []int)deprecated
- func (x *UserChangeNotification) GetTimestamp() int64
- func (x *UserChangeNotification) GetType() UserChangeNotification_ChangeType
- func (x *UserChangeNotification) GetUser() *UserInfo
- func (*UserChangeNotification) ProtoMessage()
- func (x *UserChangeNotification) ProtoReflect() protoreflect.Message
- func (x *UserChangeNotification) Reset()
- func (x *UserChangeNotification) String() string
- type UserChangeNotification_ChangeType
- func (UserChangeNotification_ChangeType) Descriptor() protoreflect.EnumDescriptor
- func (x UserChangeNotification_ChangeType) Enum() *UserChangeNotification_ChangeType
- func (UserChangeNotification_ChangeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x UserChangeNotification_ChangeType) Number() protoreflect.EnumNumber
- func (x UserChangeNotification_ChangeType) String() string
- func (UserChangeNotification_ChangeType) Type() protoreflect.EnumType
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetDeviceLimit() int32
- func (x *UserInfo) GetExpiredAt() int64
- func (x *UserInfo) GetExtra() map[string]string
- func (x *UserInfo) GetId() uint32
- func (x *UserInfo) GetSpeedLimit() int64
- func (x *UserInfo) GetTransferEnable() int64
- func (x *UserInfo) GetUsedDownload() int64
- func (x *UserInfo) GetUsedUpload() int64
- func (x *UserInfo) GetUuid() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserListRequest
- func (*UserListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserListRequest) GetNodeId() uint32
- func (x *UserListRequest) GetPage() int32
- func (x *UserListRequest) GetPageSize() int32
- func (*UserListRequest) ProtoMessage()
- func (x *UserListRequest) ProtoReflect() protoreflect.Message
- func (x *UserListRequest) Reset()
- func (x *UserListRequest) String() string
- type UserListResponse
- func (*UserListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserListResponse) GetTotal() int64
- func (x *UserListResponse) GetUpdatedAt() int64
- func (x *UserListResponse) GetUsers() []*UserInfo
- func (*UserListResponse) ProtoMessage()
- func (x *UserListResponse) ProtoReflect() protoreflect.Message
- func (x *UserListResponse) Reset()
- func (x *UserListResponse) String() string
- type UserServiceClient
- type UserServiceServer
- type UserService_UserChangesClient
- type UserService_UserChangesServer
Constants ¶
const ( NodeService_Register_FullMethodName = "/v2board.NodeService/Register" NodeService_GetConfig_FullMethodName = "/v2board.NodeService/GetConfig" NodeService_ReportStatus_FullMethodName = "/v2board.NodeService/ReportStatus" NodeService_StatusStream_FullMethodName = "/v2board.NodeService/StatusStream" )
const ( UserService_GetUsers_FullMethodName = "/v2board.UserService/GetUsers" UserService_UserChanges_FullMethodName = "/v2board.UserService/UserChanges" )
const ( TrafficService_ReportTraffic_FullMethodName = "/v2board.TrafficService/ReportTraffic" TrafficService_ReportOnline_FullMethodName = "/v2board.TrafficService/ReportOnline" TrafficService_TrafficStream_FullMethodName = "/v2board.TrafficService/TrafficStream" TrafficService_OnlineStream_FullMethodName = "/v2board.TrafficService/OnlineStream" )
const ( ConfigSyncService_SyncConfig_FullMethodName = "/v2board.ConfigSyncService/SyncConfig" ConfigSyncService_ConfigChanges_FullMethodName = "/v2board.ConfigSyncService/ConfigChanges" ConfigSyncService_FullSync_FullMethodName = "/v2board.ConfigSyncService/FullSync" )
const ( HealthService_Check_FullMethodName = "/v2board.HealthService/Check" HealthService_Watch_FullMethodName = "/v2board.HealthService/Watch" )
const (
NodeLogService_ReportLogs_FullMethodName = "/v2board.NodeLogService/ReportLogs"
)
Variables ¶
var ( UserChangeNotification_ChangeType_name = map[int32]string{ 0: "UNKNOWN", 1: "CREATED", 2: "UPDATED", 3: "DELETED", 4: "TRAFFIC_RESET", 5: "BANNED", 6: "UNBANNED", } UserChangeNotification_ChangeType_value = map[string]int32{ "UNKNOWN": 0, "CREATED": 1, "UPDATED": 2, "DELETED": 3, "TRAFFIC_RESET": 4, "BANNED": 5, "UNBANNED": 6, } )
Enum value maps for UserChangeNotification_ChangeType.
var ( ConfigChangeNotification_ChangeType_name = map[int32]string{ 0: "UNKNOWN", 1: "NODE_CONFIG", 2: "USER_LIST", 3: "PROTOCOL_CONFIG", } ConfigChangeNotification_ChangeType_value = map[string]int32{ "UNKNOWN": 0, "NODE_CONFIG": 1, "USER_LIST": 2, "PROTOCOL_CONFIG": 3, } )
Enum value maps for ConfigChangeNotification_ChangeType.
var ( HealthCheckResponse_ServingStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "SERVING", 2: "NOT_SERVING", } HealthCheckResponse_ServingStatus_value = map[string]int32{ "UNKNOWN": 0, "SERVING": 1, "NOT_SERVING": 2, } )
Enum value maps for HealthCheckResponse_ServingStatus.
var ConfigSyncService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.ConfigSyncService", HandlerType: (*ConfigSyncServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncConfig", Handler: _ConfigSyncService_SyncConfig_Handler, }, { MethodName: "FullSync", Handler: _ConfigSyncService_FullSync_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ConfigChanges", Handler: _ConfigSyncService_ConfigChanges_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/grpc/v2board.proto", }
ConfigSyncService_ServiceDesc is the grpc.ServiceDesc for ConfigSyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_grpc_v2board_proto protoreflect.FileDescriptor
var HealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.HealthService", HandlerType: (*HealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Check", Handler: _HealthService_Check_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _HealthService_Watch_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/grpc/v2board.proto", }
HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var NodeLogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.NodeLogService", HandlerType: (*NodeLogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReportLogs", Handler: _NodeLogService_ReportLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/grpc/v2board.proto", }
NodeLogService_ServiceDesc is the grpc.ServiceDesc for NodeLogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var NodeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.NodeService", HandlerType: (*NodeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _NodeService_Register_Handler, }, { MethodName: "GetConfig", Handler: _NodeService_GetConfig_Handler, }, { MethodName: "ReportStatus", Handler: _NodeService_ReportStatus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StatusStream", Handler: _NodeService_StatusStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/grpc/v2board.proto", }
NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TrafficService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.TrafficService", HandlerType: (*TrafficServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReportTraffic", Handler: _TrafficService_ReportTraffic_Handler, }, { MethodName: "ReportOnline", Handler: _TrafficService_ReportOnline_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "TrafficStream", Handler: _TrafficService_TrafficStream_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "OnlineStream", Handler: _TrafficService_OnlineStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/grpc/v2board.proto", }
TrafficService_ServiceDesc is the grpc.ServiceDesc for TrafficService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v2board.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsers", Handler: _UserService_GetUsers_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "UserChanges", Handler: _UserService_UserChanges_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/grpc/v2board.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterConfigSyncServiceServer ¶
func RegisterConfigSyncServiceServer(s grpc.ServiceRegistrar, srv ConfigSyncServiceServer)
func RegisterHealthServiceServer ¶
func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
func RegisterNodeLogServiceServer ¶
func RegisterNodeLogServiceServer(s grpc.ServiceRegistrar, srv NodeLogServiceServer)
func RegisterNodeServiceServer ¶
func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)
func RegisterTrafficServiceServer ¶
func RegisterTrafficServiceServer(s grpc.ServiceRegistrar, srv TrafficServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type BaseConfig ¶
type BaseConfig struct {
PushInterval int32 `protobuf:"varint,1,opt,name=push_interval,json=pushInterval,proto3" json:"push_interval,omitempty"` // 流量上报间隔(秒)
PullInterval int32 `protobuf:"varint,2,opt,name=pull_interval,json=pullInterval,proto3" json:"pull_interval,omitempty"` // 配置拉取间隔(秒)
// contains filtered or unexported fields
}
基础配置
func (*BaseConfig) Descriptor
deprecated
func (*BaseConfig) Descriptor() ([]byte, []int)
Deprecated: Use BaseConfig.ProtoReflect.Descriptor instead.
func (*BaseConfig) GetPullInterval ¶
func (x *BaseConfig) GetPullInterval() int32
func (*BaseConfig) GetPushInterval ¶
func (x *BaseConfig) GetPushInterval() int32
func (*BaseConfig) ProtoMessage ¶
func (*BaseConfig) ProtoMessage()
func (*BaseConfig) ProtoReflect ¶
func (x *BaseConfig) ProtoReflect() protoreflect.Message
func (*BaseConfig) Reset ¶
func (x *BaseConfig) Reset()
func (*BaseConfig) String ¶
func (x *BaseConfig) String() string
type ConfigChangeNotification ¶
type ConfigChangeNotification struct {
Type ConfigChangeNotification_ChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=v2board.ConfigChangeNotification_ChangeType" json:"type,omitempty"`
NodeId uint32 `protobuf:"varint,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // 变更内容(JSON)
// contains filtered or unexported fields
}
配置变更通知
func (*ConfigChangeNotification) Descriptor
deprecated
func (*ConfigChangeNotification) Descriptor() ([]byte, []int)
Deprecated: Use ConfigChangeNotification.ProtoReflect.Descriptor instead.
func (*ConfigChangeNotification) GetNodeId ¶
func (x *ConfigChangeNotification) GetNodeId() uint32
func (*ConfigChangeNotification) GetPayload ¶
func (x *ConfigChangeNotification) GetPayload() []byte
func (*ConfigChangeNotification) GetTimestamp ¶
func (x *ConfigChangeNotification) GetTimestamp() int64
func (*ConfigChangeNotification) GetType ¶
func (x *ConfigChangeNotification) GetType() ConfigChangeNotification_ChangeType
func (*ConfigChangeNotification) ProtoMessage ¶
func (*ConfigChangeNotification) ProtoMessage()
func (*ConfigChangeNotification) ProtoReflect ¶
func (x *ConfigChangeNotification) ProtoReflect() protoreflect.Message
func (*ConfigChangeNotification) Reset ¶
func (x *ConfigChangeNotification) Reset()
func (*ConfigChangeNotification) String ¶
func (x *ConfigChangeNotification) String() string
type ConfigChangeNotification_ChangeType ¶
type ConfigChangeNotification_ChangeType int32
const ( ConfigChangeNotification_UNKNOWN ConfigChangeNotification_ChangeType = 0 ConfigChangeNotification_NODE_CONFIG ConfigChangeNotification_ChangeType = 1 // 节点配置变更 ConfigChangeNotification_USER_LIST ConfigChangeNotification_ChangeType = 2 // 用户列表变更 ConfigChangeNotification_PROTOCOL_CONFIG ConfigChangeNotification_ChangeType = 3 // 协议配置变更 )
func (ConfigChangeNotification_ChangeType) Descriptor ¶
func (ConfigChangeNotification_ChangeType) Descriptor() protoreflect.EnumDescriptor
func (ConfigChangeNotification_ChangeType) Enum ¶
func (x ConfigChangeNotification_ChangeType) Enum() *ConfigChangeNotification_ChangeType
func (ConfigChangeNotification_ChangeType) EnumDescriptor
deprecated
func (ConfigChangeNotification_ChangeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ConfigChangeNotification_ChangeType.Descriptor instead.
func (ConfigChangeNotification_ChangeType) Number ¶
func (x ConfigChangeNotification_ChangeType) Number() protoreflect.EnumNumber
func (ConfigChangeNotification_ChangeType) String ¶
func (x ConfigChangeNotification_ChangeType) String() string
func (ConfigChangeNotification_ChangeType) Type ¶
func (ConfigChangeNotification_ChangeType) Type() protoreflect.EnumType
type ConfigSyncRequest ¶
type ConfigSyncRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
LastSyncTime int64 `protobuf:"varint,2,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"` // 上次同步时间
// contains filtered or unexported fields
}
配置同步请求
func (*ConfigSyncRequest) Descriptor
deprecated
func (*ConfigSyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConfigSyncRequest.ProtoReflect.Descriptor instead.
func (*ConfigSyncRequest) GetLastSyncTime ¶
func (x *ConfigSyncRequest) GetLastSyncTime() int64
func (*ConfigSyncRequest) GetNodeId ¶
func (x *ConfigSyncRequest) GetNodeId() uint32
func (*ConfigSyncRequest) ProtoMessage ¶
func (*ConfigSyncRequest) ProtoMessage()
func (*ConfigSyncRequest) ProtoReflect ¶
func (x *ConfigSyncRequest) ProtoReflect() protoreflect.Message
func (*ConfigSyncRequest) Reset ¶
func (x *ConfigSyncRequest) Reset()
func (*ConfigSyncRequest) String ¶
func (x *ConfigSyncRequest) String() string
type ConfigSyncResponse ¶
type ConfigSyncResponse struct {
HasChanges bool `protobuf:"varint,1,opt,name=has_changes,json=hasChanges,proto3" json:"has_changes,omitempty"`
Config *NodeConfigResponse `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` // 如果有变更
Users []*UserInfo `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` // 用户列表(全量或增量)
SyncTime int64 `protobuf:"varint,4,opt,name=sync_time,json=syncTime,proto3" json:"sync_time,omitempty"` // 当前同步时间
// contains filtered or unexported fields
}
配置同步响应
func (*ConfigSyncResponse) Descriptor
deprecated
func (*ConfigSyncResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConfigSyncResponse.ProtoReflect.Descriptor instead.
func (*ConfigSyncResponse) GetConfig ¶
func (x *ConfigSyncResponse) GetConfig() *NodeConfigResponse
func (*ConfigSyncResponse) GetHasChanges ¶
func (x *ConfigSyncResponse) GetHasChanges() bool
func (*ConfigSyncResponse) GetSyncTime ¶
func (x *ConfigSyncResponse) GetSyncTime() int64
func (*ConfigSyncResponse) GetUsers ¶
func (x *ConfigSyncResponse) GetUsers() []*UserInfo
func (*ConfigSyncResponse) ProtoMessage ¶
func (*ConfigSyncResponse) ProtoMessage()
func (*ConfigSyncResponse) ProtoReflect ¶
func (x *ConfigSyncResponse) ProtoReflect() protoreflect.Message
func (*ConfigSyncResponse) Reset ¶
func (x *ConfigSyncResponse) Reset()
func (*ConfigSyncResponse) String ¶
func (x *ConfigSyncResponse) String() string
type ConfigSyncServiceClient ¶
type ConfigSyncServiceClient interface {
// 请求配置同步
SyncConfig(ctx context.Context, in *ConfigSyncRequest, opts ...grpc.CallOption) (*ConfigSyncResponse, error)
// 双向流:配置变更实时推送
// 面板推送变更,节点确认接收
ConfigChanges(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ConfigChangeNotification, StatusResponse], error)
// 全量同步 (节点启动时)
FullSync(ctx context.Context, in *ConfigSyncRequest, opts ...grpc.CallOption) (*ConfigSyncResponse, error)
}
ConfigSyncServiceClient is the client API for ConfigSyncService 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 NewConfigSyncServiceClient ¶
func NewConfigSyncServiceClient(cc grpc.ClientConnInterface) ConfigSyncServiceClient
type ConfigSyncServiceServer ¶
type ConfigSyncServiceServer interface {
// 请求配置同步
SyncConfig(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
// 双向流:配置变更实时推送
// 面板推送变更,节点确认接收
ConfigChanges(grpc.BidiStreamingServer[ConfigChangeNotification, StatusResponse]) error
// 全量同步 (节点启动时)
FullSync(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
// contains filtered or unexported methods
}
ConfigSyncServiceServer is the server API for ConfigSyncService service. All implementations must embed UnimplementedConfigSyncServiceServer for forward compatibility.
配置同步服务
type ConfigSyncService_ConfigChangesClient ¶
type ConfigSyncService_ConfigChangesClient = grpc.BidiStreamingClient[ConfigChangeNotification, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConfigSyncService_ConfigChangesServer ¶
type ConfigSyncService_ConfigChangesServer = grpc.BidiStreamingServer[ConfigChangeNotification, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
空响应
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type HealthCheckRequest ¶
type HealthCheckRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
健康检查请求
func (*HealthCheckRequest) Descriptor
deprecated
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) GetNodeId ¶
func (x *HealthCheckRequest) GetNodeId() uint32
func (*HealthCheckRequest) GetVersion ¶
func (x *HealthCheckRequest) GetVersion() string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=v2board.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
ServerVersion string `protobuf:"bytes,2,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
健康检查响应
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) GetServerVersion ¶
func (x *HealthCheckResponse) GetServerVersion() string
func (*HealthCheckResponse) GetStatus ¶
func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) GetTimestamp ¶
func (x *HealthCheckResponse) GetTimestamp() int64
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 )
func (HealthCheckResponse_ServingStatus) Descriptor ¶
func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
func (HealthCheckResponse_ServingStatus) Enum ¶
func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
func (HealthCheckResponse_ServingStatus) EnumDescriptor
deprecated
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.
func (HealthCheckResponse_ServingStatus) Number ¶
func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
func (HealthCheckResponse_ServingStatus) Type ¶
func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
type HealthServiceClient ¶
type HealthServiceClient interface {
// 简单健康检查
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
// 双向流:持续健康检查
Watch(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HealthCheckRequest, HealthCheckResponse], error)
}
HealthServiceClient is the client API for HealthService 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 NewHealthServiceClient ¶
func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient
type HealthServiceServer ¶
type HealthServiceServer interface {
// 简单健康检查
Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
// 双向流:持续健康检查
Watch(grpc.BidiStreamingServer[HealthCheckRequest, HealthCheckResponse]) error
// contains filtered or unexported methods
}
HealthServiceServer is the server API for HealthService service. All implementations must embed UnimplementedHealthServiceServer for forward compatibility.
健康检查服务
type HealthService_WatchClient ¶
type HealthService_WatchClient = grpc.BidiStreamingClient[HealthCheckRequest, HealthCheckResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type HealthService_WatchServer ¶
type HealthService_WatchServer = grpc.BidiStreamingServer[HealthCheckRequest, HealthCheckResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeConfigRequest ¶
type NodeConfigRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
// contains filtered or unexported fields
}
节点配置请求
func (*NodeConfigRequest) Descriptor
deprecated
func (*NodeConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use NodeConfigRequest.ProtoReflect.Descriptor instead.
func (*NodeConfigRequest) GetNodeId ¶
func (x *NodeConfigRequest) GetNodeId() uint32
func (*NodeConfigRequest) ProtoMessage ¶
func (*NodeConfigRequest) ProtoMessage()
func (*NodeConfigRequest) ProtoReflect ¶
func (x *NodeConfigRequest) ProtoReflect() protoreflect.Message
func (*NodeConfigRequest) Reset ¶
func (x *NodeConfigRequest) Reset()
func (*NodeConfigRequest) String ¶
func (x *NodeConfigRequest) String() string
type NodeConfigResponse ¶
type NodeConfigResponse struct {
NodeType string `protobuf:"bytes,1,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // 与 node_type 一致
Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
ServerPort int32 `protobuf:"varint,4,opt,name=server_port,json=serverPort,proto3" json:"server_port,omitempty"`
ServerName string `protobuf:"bytes,5,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
Tls int32 `protobuf:"varint,6,opt,name=tls,proto3" json:"tls,omitempty"` // 0=无, 1=TLS, 2=Reality
TlsSettings map[string]string `` /* 168-byte string literal not displayed */
Network string `protobuf:"bytes,8,opt,name=network,proto3" json:"network,omitempty"` // tcp, ws, grpc, etc.
NetworkSettings map[string]string `` /* 180-byte string literal not displayed */
Cipher string `protobuf:"bytes,10,opt,name=cipher,proto3" json:"cipher,omitempty"` // SS加密方式
Flow string `protobuf:"bytes,11,opt,name=flow,proto3" json:"flow,omitempty"` // VLESS flow
ServerKey string `protobuf:"bytes,12,opt,name=server_key,json=serverKey,proto3" json:"server_key,omitempty"` // SS2022服务器密钥
BaseConfig *BaseConfig `protobuf:"bytes,13,opt,name=base_config,json=baseConfig,proto3" json:"base_config,omitempty"`
Routes []*Route `protobuf:"bytes,14,rep,name=routes,proto3" json:"routes,omitempty"`
SendThrough string `protobuf:"bytes,15,opt,name=send_through,json=sendThrough,proto3" json:"send_through,omitempty"`
Extra map[string]string `` // 扩展配置
/* 138-byte string literal not displayed */
// contains filtered or unexported fields
}
节点配置响应
func (*NodeConfigResponse) Descriptor
deprecated
func (*NodeConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use NodeConfigResponse.ProtoReflect.Descriptor instead.
func (*NodeConfigResponse) GetBaseConfig ¶
func (x *NodeConfigResponse) GetBaseConfig() *BaseConfig
func (*NodeConfigResponse) GetCipher ¶
func (x *NodeConfigResponse) GetCipher() string
func (*NodeConfigResponse) GetExtra ¶
func (x *NodeConfigResponse) GetExtra() map[string]string
func (*NodeConfigResponse) GetFlow ¶
func (x *NodeConfigResponse) GetFlow() string
func (*NodeConfigResponse) GetHost ¶
func (x *NodeConfigResponse) GetHost() string
func (*NodeConfigResponse) GetNetwork ¶
func (x *NodeConfigResponse) GetNetwork() string
func (*NodeConfigResponse) GetNetworkSettings ¶
func (x *NodeConfigResponse) GetNetworkSettings() map[string]string
func (*NodeConfigResponse) GetNodeType ¶
func (x *NodeConfigResponse) GetNodeType() string
func (*NodeConfigResponse) GetRoutes ¶
func (x *NodeConfigResponse) GetRoutes() []*Route
func (*NodeConfigResponse) GetSendThrough ¶
func (x *NodeConfigResponse) GetSendThrough() string
func (*NodeConfigResponse) GetServerKey ¶
func (x *NodeConfigResponse) GetServerKey() string
func (*NodeConfigResponse) GetServerName ¶
func (x *NodeConfigResponse) GetServerName() string
func (*NodeConfigResponse) GetServerPort ¶
func (x *NodeConfigResponse) GetServerPort() int32
func (*NodeConfigResponse) GetTls ¶
func (x *NodeConfigResponse) GetTls() int32
func (*NodeConfigResponse) GetTlsSettings ¶
func (x *NodeConfigResponse) GetTlsSettings() map[string]string
func (*NodeConfigResponse) GetType ¶
func (x *NodeConfigResponse) GetType() string
func (*NodeConfigResponse) ProtoMessage ¶
func (*NodeConfigResponse) ProtoMessage()
func (*NodeConfigResponse) ProtoReflect ¶
func (x *NodeConfigResponse) ProtoReflect() protoreflect.Message
func (*NodeConfigResponse) Reset ¶
func (x *NodeConfigResponse) Reset()
func (*NodeConfigResponse) String ¶
func (x *NodeConfigResponse) String() string
type NodeLogBatchRequest ¶
type NodeLogBatchRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Logs []*NodeLogEntry `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"`
// contains filtered or unexported fields
}
批量节点运行日志上报
func (*NodeLogBatchRequest) Descriptor
deprecated
func (*NodeLogBatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use NodeLogBatchRequest.ProtoReflect.Descriptor instead.
func (*NodeLogBatchRequest) GetLogs ¶
func (x *NodeLogBatchRequest) GetLogs() []*NodeLogEntry
func (*NodeLogBatchRequest) GetNodeId ¶
func (x *NodeLogBatchRequest) GetNodeId() uint32
func (*NodeLogBatchRequest) ProtoMessage ¶
func (*NodeLogBatchRequest) ProtoMessage()
func (*NodeLogBatchRequest) ProtoReflect ¶
func (x *NodeLogBatchRequest) ProtoReflect() protoreflect.Message
func (*NodeLogBatchRequest) Reset ¶
func (x *NodeLogBatchRequest) Reset()
func (*NodeLogBatchRequest) String ¶
func (x *NodeLogBatchRequest) String() string
type NodeLogEntry ¶
type NodeLogEntry struct {
Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` // debug/info/warning/error
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // 模块/组件名称
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // 日志正文
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix 时间戳(秒,或毫秒也兼容)
FieldsJson string `protobuf:"bytes,5,opt,name=fields_json,json=fieldsJson,proto3" json:"fields_json,omitempty"` // 结构化附加字段(JSON字符串)
TraceId string `protobuf:"bytes,6,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // 关联追踪ID
// contains filtered or unexported fields
}
节点运行日志
func (*NodeLogEntry) Descriptor
deprecated
func (*NodeLogEntry) Descriptor() ([]byte, []int)
Deprecated: Use NodeLogEntry.ProtoReflect.Descriptor instead.
func (*NodeLogEntry) GetFieldsJson ¶
func (x *NodeLogEntry) GetFieldsJson() string
func (*NodeLogEntry) GetLevel ¶
func (x *NodeLogEntry) GetLevel() string
func (*NodeLogEntry) GetMessage ¶
func (x *NodeLogEntry) GetMessage() string
func (*NodeLogEntry) GetSource ¶
func (x *NodeLogEntry) GetSource() string
func (*NodeLogEntry) GetTimestamp ¶
func (x *NodeLogEntry) GetTimestamp() int64
func (*NodeLogEntry) GetTraceId ¶
func (x *NodeLogEntry) GetTraceId() string
func (*NodeLogEntry) ProtoMessage ¶
func (*NodeLogEntry) ProtoMessage()
func (*NodeLogEntry) ProtoReflect ¶
func (x *NodeLogEntry) ProtoReflect() protoreflect.Message
func (*NodeLogEntry) Reset ¶
func (x *NodeLogEntry) Reset()
func (*NodeLogEntry) String ¶
func (x *NodeLogEntry) String() string
type NodeLogServiceClient ¶
type NodeLogServiceClient interface {
// 批量上报节点运行日志
ReportLogs(ctx context.Context, in *NodeLogBatchRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}
NodeLogServiceClient is the client API for NodeLogService 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 NewNodeLogServiceClient ¶
func NewNodeLogServiceClient(cc grpc.ClientConnInterface) NodeLogServiceClient
type NodeLogServiceServer ¶
type NodeLogServiceServer interface {
// 批量上报节点运行日志
ReportLogs(context.Context, *NodeLogBatchRequest) (*StatusResponse, error)
// contains filtered or unexported methods
}
NodeLogServiceServer is the server API for NodeLogService service. All implementations must embed UnimplementedNodeLogServiceServer for forward compatibility.
节点日志服务
type NodeRegisterRequest ¶
type NodeRegisterRequest struct {
AuthKey string `protobuf:"bytes,1,opt,name=auth_key,json=authKey,proto3" json:"auth_key,omitempty"` // 授权密钥
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 节点名称
Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` // 节点地址
Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` // API端口
ServerVersion string `protobuf:"bytes,5,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"` // 节点版本
ServerOs string `protobuf:"bytes,6,opt,name=server_os,json=serverOs,proto3" json:"server_os,omitempty"` // 操作系统
SupportedProtocols []string `protobuf:"bytes,7,rep,name=supported_protocols,json=supportedProtocols,proto3" json:"supported_protocols,omitempty"` // 支持的协议列表
// contains filtered or unexported fields
}
节点注册请求
func (*NodeRegisterRequest) Descriptor
deprecated
func (*NodeRegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use NodeRegisterRequest.ProtoReflect.Descriptor instead.
func (*NodeRegisterRequest) GetAuthKey ¶
func (x *NodeRegisterRequest) GetAuthKey() string
func (*NodeRegisterRequest) GetHost ¶
func (x *NodeRegisterRequest) GetHost() string
func (*NodeRegisterRequest) GetName ¶
func (x *NodeRegisterRequest) GetName() string
func (*NodeRegisterRequest) GetPort ¶
func (x *NodeRegisterRequest) GetPort() int32
func (*NodeRegisterRequest) GetServerOs ¶
func (x *NodeRegisterRequest) GetServerOs() string
func (*NodeRegisterRequest) GetServerVersion ¶
func (x *NodeRegisterRequest) GetServerVersion() string
func (*NodeRegisterRequest) GetSupportedProtocols ¶
func (x *NodeRegisterRequest) GetSupportedProtocols() []string
func (*NodeRegisterRequest) ProtoMessage ¶
func (*NodeRegisterRequest) ProtoMessage()
func (*NodeRegisterRequest) ProtoReflect ¶
func (x *NodeRegisterRequest) ProtoReflect() protoreflect.Message
func (*NodeRegisterRequest) Reset ¶
func (x *NodeRegisterRequest) Reset()
func (*NodeRegisterRequest) String ¶
func (x *NodeRegisterRequest) String() string
type NodeRegisterResponse ¶
type NodeRegisterResponse struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // 节点ID
ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // API密钥
Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` // 共享密钥
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
节点注册响应
func (*NodeRegisterResponse) Descriptor
deprecated
func (*NodeRegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use NodeRegisterResponse.ProtoReflect.Descriptor instead.
func (*NodeRegisterResponse) GetApiKey ¶
func (x *NodeRegisterResponse) GetApiKey() string
func (*NodeRegisterResponse) GetMessage ¶
func (x *NodeRegisterResponse) GetMessage() string
func (*NodeRegisterResponse) GetNodeId ¶
func (x *NodeRegisterResponse) GetNodeId() uint32
func (*NodeRegisterResponse) GetSecret ¶
func (x *NodeRegisterResponse) GetSecret() string
func (*NodeRegisterResponse) ProtoMessage ¶
func (*NodeRegisterResponse) ProtoMessage()
func (*NodeRegisterResponse) ProtoReflect ¶
func (x *NodeRegisterResponse) ProtoReflect() protoreflect.Message
func (*NodeRegisterResponse) Reset ¶
func (x *NodeRegisterResponse) Reset()
func (*NodeRegisterResponse) String ¶
func (x *NodeRegisterResponse) String() string
type NodeServiceClient ¶
type NodeServiceClient interface {
// 节点注册
Register(ctx context.Context, in *NodeRegisterRequest, opts ...grpc.CallOption) (*NodeRegisterResponse, error)
// 获取节点配置
GetConfig(ctx context.Context, in *NodeConfigRequest, opts ...grpc.CallOption) (*NodeConfigResponse, error)
// 上报节点状态 (替代心跳)
ReportStatus(ctx context.Context, in *NodeStatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
// 双向流:节点状态实时通信
StatusStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[NodeStatusRequest, NodeConfigResponse], error)
}
NodeServiceClient is the client API for NodeService 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 NewNodeServiceClient ¶
func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient
type NodeServiceServer ¶
type NodeServiceServer interface {
// 节点注册
Register(context.Context, *NodeRegisterRequest) (*NodeRegisterResponse, error)
// 获取节点配置
GetConfig(context.Context, *NodeConfigRequest) (*NodeConfigResponse, error)
// 上报节点状态 (替代心跳)
ReportStatus(context.Context, *NodeStatusRequest) (*StatusResponse, error)
// 双向流:节点状态实时通信
StatusStream(grpc.BidiStreamingServer[NodeStatusRequest, NodeConfigResponse]) error
// contains filtered or unexported methods
}
NodeServiceServer is the server API for NodeService service. All implementations must embed UnimplementedNodeServiceServer for forward compatibility.
节点服务
type NodeService_StatusStreamClient ¶
type NodeService_StatusStreamClient = grpc.BidiStreamingClient[NodeStatusRequest, NodeConfigResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_StatusStreamServer ¶
type NodeService_StatusStreamServer = grpc.BidiStreamingServer[NodeStatusRequest, NodeConfigResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeStatusRequest ¶
type NodeStatusRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
CpuUsage float64 `protobuf:"fixed64,2,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`
MemoryUsage float64 `protobuf:"fixed64,3,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"`
DiskUsage float64 `protobuf:"fixed64,4,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"`
Uptime int64 `protobuf:"varint,5,opt,name=uptime,proto3" json:"uptime,omitempty"`
OnlineUsers int32 `protobuf:"varint,6,opt,name=online_users,json=onlineUsers,proto3" json:"online_users,omitempty"`
Upload int64 `protobuf:"varint,7,opt,name=upload,proto3" json:"upload,omitempty"` // 本次上报的上传流量增量
Download int64 `protobuf:"varint,8,opt,name=download,proto3" json:"download,omitempty"` // 本次上报的下载流量增量
// contains filtered or unexported fields
}
节点状态上报请求
func (*NodeStatusRequest) Descriptor
deprecated
func (*NodeStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use NodeStatusRequest.ProtoReflect.Descriptor instead.
func (*NodeStatusRequest) GetCpuUsage ¶
func (x *NodeStatusRequest) GetCpuUsage() float64
func (*NodeStatusRequest) GetDiskUsage ¶
func (x *NodeStatusRequest) GetDiskUsage() float64
func (*NodeStatusRequest) GetDownload ¶
func (x *NodeStatusRequest) GetDownload() int64
func (*NodeStatusRequest) GetMemoryUsage ¶
func (x *NodeStatusRequest) GetMemoryUsage() float64
func (*NodeStatusRequest) GetNodeId ¶
func (x *NodeStatusRequest) GetNodeId() uint32
func (*NodeStatusRequest) GetOnlineUsers ¶
func (x *NodeStatusRequest) GetOnlineUsers() int32
func (*NodeStatusRequest) GetUpload ¶
func (x *NodeStatusRequest) GetUpload() int64
func (*NodeStatusRequest) GetUptime ¶
func (x *NodeStatusRequest) GetUptime() int64
func (*NodeStatusRequest) ProtoMessage ¶
func (*NodeStatusRequest) ProtoMessage()
func (*NodeStatusRequest) ProtoReflect ¶
func (x *NodeStatusRequest) ProtoReflect() protoreflect.Message
func (*NodeStatusRequest) Reset ¶
func (x *NodeStatusRequest) Reset()
func (*NodeStatusRequest) String ¶
func (x *NodeStatusRequest) String() string
type OnlineData ¶
type OnlineData struct {
Ips []string `protobuf:"bytes,1,rep,name=ips,proto3" json:"ips,omitempty"` // 在线IP列表
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // 时间戳
// contains filtered or unexported fields
}
在线数据
func (*OnlineData) Descriptor
deprecated
func (*OnlineData) Descriptor() ([]byte, []int)
Deprecated: Use OnlineData.ProtoReflect.Descriptor instead.
func (*OnlineData) GetIps ¶
func (x *OnlineData) GetIps() []string
func (*OnlineData) GetTimestamp ¶
func (x *OnlineData) GetTimestamp() int64
func (*OnlineData) ProtoMessage ¶
func (*OnlineData) ProtoMessage()
func (*OnlineData) ProtoReflect ¶
func (x *OnlineData) ProtoReflect() protoreflect.Message
func (*OnlineData) Reset ¶
func (x *OnlineData) Reset()
func (*OnlineData) String ¶
func (x *OnlineData) String() string
type OnlineReportRequest ¶
type OnlineReportRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Online map[uint32]*OnlineData `` // 用户ID -> 在线数据
/* 140-byte string literal not displayed */
// contains filtered or unexported fields
}
在线状态上报请求
func (*OnlineReportRequest) Descriptor
deprecated
func (*OnlineReportRequest) Descriptor() ([]byte, []int)
Deprecated: Use OnlineReportRequest.ProtoReflect.Descriptor instead.
func (*OnlineReportRequest) GetNodeId ¶
func (x *OnlineReportRequest) GetNodeId() uint32
func (*OnlineReportRequest) GetOnline ¶
func (x *OnlineReportRequest) GetOnline() map[uint32]*OnlineData
func (*OnlineReportRequest) ProtoMessage ¶
func (*OnlineReportRequest) ProtoMessage()
func (*OnlineReportRequest) ProtoReflect ¶
func (x *OnlineReportRequest) ProtoReflect() protoreflect.Message
func (*OnlineReportRequest) Reset ¶
func (x *OnlineReportRequest) Reset()
func (*OnlineReportRequest) String ¶
func (x *OnlineReportRequest) String() string
type Route ¶
type Route struct {
Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
// contains filtered or unexported fields
}
路由配置
func (*Route) Descriptor
deprecated
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶
func (x *Route) ProtoReflect() protoreflect.Message
type StatusResponse ¶
type StatusResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
// contains filtered or unexported fields
}
状态响应
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetCode ¶
func (x *StatusResponse) GetCode() int32
func (*StatusResponse) GetMessage ¶
func (x *StatusResponse) GetMessage() string
func (*StatusResponse) GetSuccess ¶
func (x *StatusResponse) GetSuccess() bool
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type TrafficData ¶
type TrafficData struct {
Upload int64 `protobuf:"varint,1,opt,name=upload,proto3" json:"upload,omitempty"` // 上传流量 (bytes)
Download int64 `protobuf:"varint,2,opt,name=download,proto3" json:"download,omitempty"` // 下载流量 (bytes)
// contains filtered or unexported fields
}
流量数据
func (*TrafficData) Descriptor
deprecated
func (*TrafficData) Descriptor() ([]byte, []int)
Deprecated: Use TrafficData.ProtoReflect.Descriptor instead.
func (*TrafficData) GetDownload ¶
func (x *TrafficData) GetDownload() int64
func (*TrafficData) GetUpload ¶
func (x *TrafficData) GetUpload() int64
func (*TrafficData) ProtoMessage ¶
func (*TrafficData) ProtoMessage()
func (*TrafficData) ProtoReflect ¶
func (x *TrafficData) ProtoReflect() protoreflect.Message
func (*TrafficData) Reset ¶
func (x *TrafficData) Reset()
func (*TrafficData) String ¶
func (x *TrafficData) String() string
type TrafficReportRequest ¶
type TrafficReportRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Traffics map[uint32]*TrafficData `` // 用户ID -> 流量数据
/* 144-byte string literal not displayed */
// contains filtered or unexported fields
}
流量上报请求
func (*TrafficReportRequest) Descriptor
deprecated
func (*TrafficReportRequest) Descriptor() ([]byte, []int)
Deprecated: Use TrafficReportRequest.ProtoReflect.Descriptor instead.
func (*TrafficReportRequest) GetNodeId ¶
func (x *TrafficReportRequest) GetNodeId() uint32
func (*TrafficReportRequest) GetTraffics ¶
func (x *TrafficReportRequest) GetTraffics() map[uint32]*TrafficData
func (*TrafficReportRequest) ProtoMessage ¶
func (*TrafficReportRequest) ProtoMessage()
func (*TrafficReportRequest) ProtoReflect ¶
func (x *TrafficReportRequest) ProtoReflect() protoreflect.Message
func (*TrafficReportRequest) Reset ¶
func (x *TrafficReportRequest) Reset()
func (*TrafficReportRequest) String ¶
func (x *TrafficReportRequest) String() string
type TrafficReportResponse ¶
type TrafficReportResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Balances map[uint32]int64 `` // 用户ID -> 更新后的余额(可选)
/* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
流量上报响应
func (*TrafficReportResponse) Descriptor
deprecated
func (*TrafficReportResponse) Descriptor() ([]byte, []int)
Deprecated: Use TrafficReportResponse.ProtoReflect.Descriptor instead.
func (*TrafficReportResponse) GetBalances ¶
func (x *TrafficReportResponse) GetBalances() map[uint32]int64
func (*TrafficReportResponse) GetMessage ¶
func (x *TrafficReportResponse) GetMessage() string
func (*TrafficReportResponse) GetSuccess ¶
func (x *TrafficReportResponse) GetSuccess() bool
func (*TrafficReportResponse) ProtoMessage ¶
func (*TrafficReportResponse) ProtoMessage()
func (*TrafficReportResponse) ProtoReflect ¶
func (x *TrafficReportResponse) ProtoReflect() protoreflect.Message
func (*TrafficReportResponse) Reset ¶
func (x *TrafficReportResponse) Reset()
func (*TrafficReportResponse) String ¶
func (x *TrafficReportResponse) String() string
type TrafficServiceClient ¶
type TrafficServiceClient interface {
// 批量上报流量
ReportTraffic(ctx context.Context, in *TrafficReportRequest, opts ...grpc.CallOption) (*TrafficReportResponse, error)
// 上报在线状态
ReportOnline(ctx context.Context, in *OnlineReportRequest, opts ...grpc.CallOption) (*StatusResponse, error)
// 双向流:实时流量上报
// 节点持续上报,面板实时响应
TrafficStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TrafficReportRequest, TrafficReportResponse], error)
// 双向流:实时在线状态
OnlineStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[OnlineReportRequest, StatusResponse], error)
}
TrafficServiceClient is the client API for TrafficService 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 NewTrafficServiceClient ¶
func NewTrafficServiceClient(cc grpc.ClientConnInterface) TrafficServiceClient
type TrafficServiceServer ¶
type TrafficServiceServer interface {
// 批量上报流量
ReportTraffic(context.Context, *TrafficReportRequest) (*TrafficReportResponse, error)
// 上报在线状态
ReportOnline(context.Context, *OnlineReportRequest) (*StatusResponse, error)
// 双向流:实时流量上报
// 节点持续上报,面板实时响应
TrafficStream(grpc.BidiStreamingServer[TrafficReportRequest, TrafficReportResponse]) error
// 双向流:实时在线状态
OnlineStream(grpc.BidiStreamingServer[OnlineReportRequest, StatusResponse]) error
// contains filtered or unexported methods
}
TrafficServiceServer is the server API for TrafficService service. All implementations must embed UnimplementedTrafficServiceServer for forward compatibility.
流量服务
type TrafficService_OnlineStreamClient ¶
type TrafficService_OnlineStreamClient = grpc.BidiStreamingClient[OnlineReportRequest, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type TrafficService_OnlineStreamServer ¶
type TrafficService_OnlineStreamServer = grpc.BidiStreamingServer[OnlineReportRequest, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type TrafficService_TrafficStreamClient ¶
type TrafficService_TrafficStreamClient = grpc.BidiStreamingClient[TrafficReportRequest, TrafficReportResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type TrafficService_TrafficStreamServer ¶
type TrafficService_TrafficStreamServer = grpc.BidiStreamingServer[TrafficReportRequest, TrafficReportResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedConfigSyncServiceServer ¶
type UnimplementedConfigSyncServiceServer struct{}
UnimplementedConfigSyncServiceServer 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 (UnimplementedConfigSyncServiceServer) ConfigChanges ¶
func (UnimplementedConfigSyncServiceServer) ConfigChanges(grpc.BidiStreamingServer[ConfigChangeNotification, StatusResponse]) error
func (UnimplementedConfigSyncServiceServer) FullSync ¶
func (UnimplementedConfigSyncServiceServer) FullSync(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
func (UnimplementedConfigSyncServiceServer) SyncConfig ¶
func (UnimplementedConfigSyncServiceServer) SyncConfig(context.Context, *ConfigSyncRequest) (*ConfigSyncResponse, error)
type UnimplementedHealthServiceServer ¶
type UnimplementedHealthServiceServer struct{}
UnimplementedHealthServiceServer 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 (UnimplementedHealthServiceServer) Check ¶
func (UnimplementedHealthServiceServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
type UnimplementedNodeLogServiceServer ¶
type UnimplementedNodeLogServiceServer struct{}
UnimplementedNodeLogServiceServer 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 (UnimplementedNodeLogServiceServer) ReportLogs ¶
func (UnimplementedNodeLogServiceServer) ReportLogs(context.Context, *NodeLogBatchRequest) (*StatusResponse, error)
type UnimplementedNodeServiceServer ¶
type UnimplementedNodeServiceServer struct{}
UnimplementedNodeServiceServer 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 (UnimplementedNodeServiceServer) GetConfig ¶
func (UnimplementedNodeServiceServer) GetConfig(context.Context, *NodeConfigRequest) (*NodeConfigResponse, error)
func (UnimplementedNodeServiceServer) Register ¶
func (UnimplementedNodeServiceServer) Register(context.Context, *NodeRegisterRequest) (*NodeRegisterResponse, error)
func (UnimplementedNodeServiceServer) ReportStatus ¶
func (UnimplementedNodeServiceServer) ReportStatus(context.Context, *NodeStatusRequest) (*StatusResponse, error)
func (UnimplementedNodeServiceServer) StatusStream ¶
func (UnimplementedNodeServiceServer) StatusStream(grpc.BidiStreamingServer[NodeStatusRequest, NodeConfigResponse]) error
type UnimplementedTrafficServiceServer ¶
type UnimplementedTrafficServiceServer struct{}
UnimplementedTrafficServiceServer 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 (UnimplementedTrafficServiceServer) OnlineStream ¶
func (UnimplementedTrafficServiceServer) OnlineStream(grpc.BidiStreamingServer[OnlineReportRequest, StatusResponse]) error
func (UnimplementedTrafficServiceServer) ReportOnline ¶
func (UnimplementedTrafficServiceServer) ReportOnline(context.Context, *OnlineReportRequest) (*StatusResponse, error)
func (UnimplementedTrafficServiceServer) ReportTraffic ¶
func (UnimplementedTrafficServiceServer) ReportTraffic(context.Context, *TrafficReportRequest) (*TrafficReportResponse, error)
func (UnimplementedTrafficServiceServer) TrafficStream ¶
func (UnimplementedTrafficServiceServer) TrafficStream(grpc.BidiStreamingServer[TrafficReportRequest, TrafficReportResponse]) error
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer 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 (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(context.Context, *UserListRequest) (*UserListResponse, error)
func (UnimplementedUserServiceServer) UserChanges ¶
func (UnimplementedUserServiceServer) UserChanges(grpc.BidiStreamingServer[UserChangeNotification, StatusResponse]) error
type UnsafeConfigSyncServiceServer ¶
type UnsafeConfigSyncServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConfigSyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigSyncServiceServer will result in compilation errors.
type UnsafeHealthServiceServer ¶
type UnsafeHealthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.
type UnsafeNodeLogServiceServer ¶
type UnsafeNodeLogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNodeLogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeLogServiceServer will result in compilation errors.
type UnsafeNodeServiceServer ¶
type UnsafeNodeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeServiceServer will result in compilation errors.
type UnsafeTrafficServiceServer ¶
type UnsafeTrafficServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTrafficServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrafficServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UserChangeNotification ¶
type UserChangeNotification struct {
Type UserChangeNotification_ChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=v2board.UserChangeNotification_ChangeType" json:"type,omitempty"`
User *UserInfo `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
用户变更通知
func (*UserChangeNotification) Descriptor
deprecated
func (*UserChangeNotification) Descriptor() ([]byte, []int)
Deprecated: Use UserChangeNotification.ProtoReflect.Descriptor instead.
func (*UserChangeNotification) GetTimestamp ¶
func (x *UserChangeNotification) GetTimestamp() int64
func (*UserChangeNotification) GetType ¶
func (x *UserChangeNotification) GetType() UserChangeNotification_ChangeType
func (*UserChangeNotification) GetUser ¶
func (x *UserChangeNotification) GetUser() *UserInfo
func (*UserChangeNotification) ProtoMessage ¶
func (*UserChangeNotification) ProtoMessage()
func (*UserChangeNotification) ProtoReflect ¶
func (x *UserChangeNotification) ProtoReflect() protoreflect.Message
func (*UserChangeNotification) Reset ¶
func (x *UserChangeNotification) Reset()
func (*UserChangeNotification) String ¶
func (x *UserChangeNotification) String() string
type UserChangeNotification_ChangeType ¶
type UserChangeNotification_ChangeType int32
const ( UserChangeNotification_UNKNOWN UserChangeNotification_ChangeType = 0 UserChangeNotification_CREATED UserChangeNotification_ChangeType = 1 UserChangeNotification_UPDATED UserChangeNotification_ChangeType = 2 UserChangeNotification_DELETED UserChangeNotification_ChangeType = 3 UserChangeNotification_TRAFFIC_RESET UserChangeNotification_ChangeType = 4 UserChangeNotification_BANNED UserChangeNotification_ChangeType = 5 UserChangeNotification_UNBANNED UserChangeNotification_ChangeType = 6 )
func (UserChangeNotification_ChangeType) Descriptor ¶
func (UserChangeNotification_ChangeType) Descriptor() protoreflect.EnumDescriptor
func (UserChangeNotification_ChangeType) Enum ¶
func (x UserChangeNotification_ChangeType) Enum() *UserChangeNotification_ChangeType
func (UserChangeNotification_ChangeType) EnumDescriptor
deprecated
func (UserChangeNotification_ChangeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use UserChangeNotification_ChangeType.Descriptor instead.
func (UserChangeNotification_ChangeType) Number ¶
func (x UserChangeNotification_ChangeType) Number() protoreflect.EnumNumber
func (UserChangeNotification_ChangeType) String ¶
func (x UserChangeNotification_ChangeType) String() string
func (UserChangeNotification_ChangeType) Type ¶
func (UserChangeNotification_ChangeType) Type() protoreflect.EnumType
type UserInfo ¶
type UserInfo struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
SpeedLimit int64 `protobuf:"varint,3,opt,name=speed_limit,json=speedLimit,proto3" json:"speed_limit,omitempty"` // 速度限制 (bytes/s)
DeviceLimit int32 `protobuf:"varint,4,opt,name=device_limit,json=deviceLimit,proto3" json:"device_limit,omitempty"` // 设备限制
ExpiredAt int64 `protobuf:"varint,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` // 过期时间
TransferEnable int64 `protobuf:"varint,6,opt,name=transfer_enable,json=transferEnable,proto3" json:"transfer_enable,omitempty"` // 总流量
UsedUpload int64 `protobuf:"varint,7,opt,name=used_upload,json=usedUpload,proto3" json:"used_upload,omitempty"` // 已用上传
UsedDownload int64 `protobuf:"varint,8,opt,name=used_download,json=usedDownload,proto3" json:"used_download,omitempty"` // 已用下载
Extra map[string]string `` // 扩展信息
/* 137-byte string literal not displayed */
// contains filtered or unexported fields
}
用户信息
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetDeviceLimit ¶
func (*UserInfo) GetExpiredAt ¶
func (*UserInfo) GetSpeedLimit ¶
func (*UserInfo) GetTransferEnable ¶
func (*UserInfo) GetUsedDownload ¶
func (*UserInfo) GetUsedUpload ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserListRequest ¶
type UserListRequest struct {
NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// contains filtered or unexported fields
}
用户列表请求
func (*UserListRequest) Descriptor
deprecated
func (*UserListRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserListRequest.ProtoReflect.Descriptor instead.
func (*UserListRequest) GetNodeId ¶
func (x *UserListRequest) GetNodeId() uint32
func (*UserListRequest) GetPage ¶
func (x *UserListRequest) GetPage() int32
func (*UserListRequest) GetPageSize ¶
func (x *UserListRequest) GetPageSize() int32
func (*UserListRequest) ProtoMessage ¶
func (*UserListRequest) ProtoMessage()
func (*UserListRequest) ProtoReflect ¶
func (x *UserListRequest) ProtoReflect() protoreflect.Message
func (*UserListRequest) Reset ¶
func (x *UserListRequest) Reset()
func (*UserListRequest) String ¶
func (x *UserListRequest) String() string
type UserListResponse ¶
type UserListResponse struct {
Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 数据更新时间
// contains filtered or unexported fields
}
用户列表响应
func (*UserListResponse) Descriptor
deprecated
func (*UserListResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.
func (*UserListResponse) GetTotal ¶
func (x *UserListResponse) GetTotal() int64
func (*UserListResponse) GetUpdatedAt ¶
func (x *UserListResponse) GetUpdatedAt() int64
func (*UserListResponse) GetUsers ¶
func (x *UserListResponse) GetUsers() []*UserInfo
func (*UserListResponse) ProtoMessage ¶
func (*UserListResponse) ProtoMessage()
func (*UserListResponse) ProtoReflect ¶
func (x *UserListResponse) ProtoReflect() protoreflect.Message
func (*UserListResponse) Reset ¶
func (x *UserListResponse) Reset()
func (*UserListResponse) String ¶
func (x *UserListResponse) String() string
type UserServiceClient ¶
type UserServiceClient interface {
// 获取用户列表
GetUsers(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserListResponse, error)
// 双向流:用户变更实时推送
// 面板推送用户变更,节点确认接收
UserChanges(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[UserChangeNotification, StatusResponse], error)
}
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
// 获取用户列表
GetUsers(context.Context, *UserListRequest) (*UserListResponse, error)
// 双向流:用户变更实时推送
// 面板推送用户变更,节点确认接收
UserChanges(grpc.BidiStreamingServer[UserChangeNotification, StatusResponse]) error
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
用户服务
type UserService_UserChangesClient ¶
type UserService_UserChangesClient = grpc.BidiStreamingClient[UserChangeNotification, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UserService_UserChangesServer ¶
type UserService_UserChangesServer = grpc.BidiStreamingServer[UserChangeNotification, StatusResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.