Documentation ¶
Overview ¶
Package adminapi is a generated protocol buffer package.
It is generated from these files:
internal/adminapi/adminapi.proto
It has these top-level messages:
GetNodeRequest GetClientsRequest GetServersRequest GetClientsResponse GetServersResponse Client Server
Index ¶
- Variables
- func RegisterAdmininterfaceServer(s *grpc.Server, srv AdmininterfaceServer)
- type AdmininterfaceClient
- type AdmininterfaceServer
- type Client
- func (*Client) Descriptor() ([]byte, []int)
- func (m *Client) GetEventCount() uint64
- func (m *Client) GetNodeId() *abusemesh.UUID
- func (m *Client) GetServerActive() bool
- func (m *Client) GetSessionId() *abusemesh.UUID
- func (m *Client) GetState() ClientSessionState
- func (*Client) ProtoMessage()
- func (m *Client) Reset()
- func (m *Client) String() string
- type ClientSessionState
- type GetClientsRequest
- type GetClientsResponse
- type GetNodeRequest
- type GetServersRequest
- type GetServersResponse
- type Server
- func (*Server) Descriptor() ([]byte, []int)
- func (m *Server) GetClientActive() bool
- func (m *Server) GetEventCount() uint64
- func (m *Server) GetNodeId() *abusemesh.UUID
- func (m *Server) GetSessionId() *abusemesh.UUID
- func (m *Server) GetState() ServerSessionState
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) String() string
- type ServerSessionState
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientSessionState_name = map[int32]string{
0: "ClientSessionIdle",
1: "ClientSessionEstablished",
2: "ClientSessionInterrupted",
}
View Source
var ClientSessionState_value = map[string]int32{
"ClientSessionIdle": 0,
"ClientSessionEstablished": 1,
"ClientSessionInterrupted": 2,
}
View Source
var ServerSessionState_name = map[int32]string{
0: "ServerSessionIdle",
1: "ServerSessionEstablished",
2: "ServerSessionConnecting",
3: "ServerSessionInterrupted",
}
View Source
var ServerSessionState_value = map[string]int32{
"ServerSessionIdle": 0,
"ServerSessionEstablished": 1,
"ServerSessionConnecting": 2,
"ServerSessionInterrupted": 3,
}
Functions ¶
func RegisterAdmininterfaceServer ¶
func RegisterAdmininterfaceServer(s *grpc.Server, srv AdmininterfaceServer)
Types ¶
type AdmininterfaceClient ¶
type AdmininterfaceClient interface { // Returns the Node data of the current node GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*abusemesh.Node, error) // Returns all clients of this node GetClients(ctx context.Context, in *GetClientsRequest, opts ...grpc.CallOption) (*GetClientsResponse, error) // Returns all servers of this node GetServers(ctx context.Context, in *GetServersRequest, opts ...grpc.CallOption) (*GetServersResponse, error) }
func NewAdmininterfaceClient ¶
func NewAdmininterfaceClient(cc *grpc.ClientConn) AdmininterfaceClient
type AdmininterfaceServer ¶
type AdmininterfaceServer interface { // Returns the Node data of the current node GetNode(context.Context, *GetNodeRequest) (*abusemesh.Node, error) // Returns all clients of this node GetClients(context.Context, *GetClientsRequest) (*GetClientsResponse, error) // Returns all servers of this node GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error) }
type Client ¶
type Client struct { // The id of the client node NodeId *abusemesh.UUID `protobuf:"bytes,1,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` // The id of this session SessionId *abusemesh.UUID `protobuf:"bytes,2,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` // If true the server wants to connect with the client // If false no session will be accepted ServerActive bool `protobuf:"varint,3,opt,name=server_active,json=serverActive" json:"server_active,omitempty"` // The current state of the connection State ClientSessionState `protobuf:"varint,4,opt,name=state,enum=adminapi.ClientSessionState" json:"state,omitempty"` // The count of events sent to the client EventCount uint64 `protobuf:"varint,5,opt,name=event_count,json=eventCount" json:"event_count,omitempty"` }
func (*Client) Descriptor ¶
func (*Client) GetEventCount ¶
func (*Client) GetServerActive ¶
func (*Client) GetSessionId ¶
func (*Client) GetState ¶
func (m *Client) GetState() ClientSessionState
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
type ClientSessionState ¶
type ClientSessionState int32
The state the server assigned to the session with a client
const ( ClientSessionState_ClientSessionIdle ClientSessionState = 0 ClientSessionState_ClientSessionEstablished ClientSessionState = 1 ClientSessionState_ClientSessionInterrupted ClientSessionState = 2 )
func (ClientSessionState) EnumDescriptor ¶
func (ClientSessionState) EnumDescriptor() ([]byte, []int)
func (ClientSessionState) String ¶
func (x ClientSessionState) String() string
type GetClientsRequest ¶
type GetClientsRequest struct { }
func (*GetClientsRequest) Descriptor ¶
func (*GetClientsRequest) Descriptor() ([]byte, []int)
func (*GetClientsRequest) ProtoMessage ¶
func (*GetClientsRequest) ProtoMessage()
func (*GetClientsRequest) Reset ¶
func (m *GetClientsRequest) Reset()
func (*GetClientsRequest) String ¶
func (m *GetClientsRequest) String() string
type GetClientsResponse ¶
type GetClientsResponse struct {
Client []*Client `protobuf:"bytes,1,rep,name=client" json:"client,omitempty"`
}
func (*GetClientsResponse) Descriptor ¶
func (*GetClientsResponse) Descriptor() ([]byte, []int)
func (*GetClientsResponse) GetClient ¶
func (m *GetClientsResponse) GetClient() []*Client
func (*GetClientsResponse) ProtoMessage ¶
func (*GetClientsResponse) ProtoMessage()
func (*GetClientsResponse) Reset ¶
func (m *GetClientsResponse) Reset()
func (*GetClientsResponse) String ¶
func (m *GetClientsResponse) String() string
type GetNodeRequest ¶
type GetNodeRequest struct { }
func (*GetNodeRequest) Descriptor ¶
func (*GetNodeRequest) Descriptor() ([]byte, []int)
func (*GetNodeRequest) ProtoMessage ¶
func (*GetNodeRequest) ProtoMessage()
func (*GetNodeRequest) Reset ¶
func (m *GetNodeRequest) Reset()
func (*GetNodeRequest) String ¶
func (m *GetNodeRequest) String() string
type GetServersRequest ¶
type GetServersRequest struct { }
func (*GetServersRequest) Descriptor ¶
func (*GetServersRequest) Descriptor() ([]byte, []int)
func (*GetServersRequest) ProtoMessage ¶
func (*GetServersRequest) ProtoMessage()
func (*GetServersRequest) Reset ¶
func (m *GetServersRequest) Reset()
func (*GetServersRequest) String ¶
func (m *GetServersRequest) String() string
type GetServersResponse ¶
type GetServersResponse struct {
Client []*Client `protobuf:"bytes,1,rep,name=client" json:"client,omitempty"`
}
func (*GetServersResponse) Descriptor ¶
func (*GetServersResponse) Descriptor() ([]byte, []int)
func (*GetServersResponse) GetClient ¶
func (m *GetServersResponse) GetClient() []*Client
func (*GetServersResponse) ProtoMessage ¶
func (*GetServersResponse) ProtoMessage()
func (*GetServersResponse) Reset ¶
func (m *GetServersResponse) Reset()
func (*GetServersResponse) String ¶
func (m *GetServersResponse) String() string
type Server ¶
type Server struct { // The id of the server node NodeId *abusemesh.UUID `protobuf:"bytes,1,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` // The id of this session SessionId *abusemesh.UUID `protobuf:"bytes,2,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` // If true the we are trying to connect to the server // If false no connection attempts will be made ClientActive bool `protobuf:"varint,3,opt,name=client_active,json=clientActive" json:"client_active,omitempty"` // The current state of the connection State ServerSessionState `protobuf:"varint,4,opt,name=state,enum=adminapi.ServerSessionState" json:"state,omitempty"` // The count of events received by the server EventCount uint64 `protobuf:"varint,5,opt,name=event_count,json=eventCount" json:"event_count,omitempty"` }
func (*Server) Descriptor ¶
func (*Server) GetClientActive ¶
func (*Server) GetEventCount ¶
func (*Server) GetSessionId ¶
func (*Server) GetState ¶
func (m *Server) GetState() ServerSessionState
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
type ServerSessionState ¶
type ServerSessionState int32
The state the server assigned to the session with a client
const ( ServerSessionState_ServerSessionIdle ServerSessionState = 0 ServerSessionState_ServerSessionEstablished ServerSessionState = 1 ServerSessionState_ServerSessionConnecting ServerSessionState = 2 ServerSessionState_ServerSessionInterrupted ServerSessionState = 3 )
func (ServerSessionState) EnumDescriptor ¶
func (ServerSessionState) EnumDescriptor() ([]byte, []int)
func (ServerSessionState) String ¶
func (x ServerSessionState) String() string
Click to show internal directories.
Click to hide internal directories.