Documentation
¶
Index ¶
- func Node(cfg config.ServerConfig) (*pbc.Node, error)
- type GrpcServer
- func (srv *GrpcServer) AgentHeartbeat(ctx context.Context, req *pb.AgentHeartbeatReq) (*pb.AgentHeartbeatRes, error)
- func (srv *GrpcServer) GetLogger() *dlog.Logger
- func (srv *GrpcServer) ListAgent(ctx context.Context, req *pb.ListAgentReq) (*pb.ListAgentRes, error)
- func (srv *GrpcServer) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
- func (srv *GrpcServer) NodeInfo(ctx context.Context, _ *pbc.NodeInfoReq) (*pbc.NodeInfoRes, error)
- func (srv *GrpcServer) Ping(ctx context.Context, ping *pbc.Ping) (*pbc.Pong, error)
- func (srv *GrpcServer) RegisterAgent(ctx context.Context, req *pb.RegisterAgentReq) (*pb.RegisterAgentRes, error)
- func (srv *GrpcServer) SetLogger(logger *dlog.Logger)
- type HttpServer
- func (srv *HttpServer) GetLogger() *dlog.Logger
- func (srv *HttpServer) Handler() http.Handler
- func (srv *HttpServer) ListAgent(ctx context.Context) (*pb.ListAgentRes, error)
- func (srv *HttpServer) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
- func (srv *HttpServer) NodeInfo(ctx context.Context) (*pbc.NodeInfoRes, error)
- func (srv *HttpServer) Ping(ctx context.Context, ping *pbc.Ping) (*pbc.Pong, error)
- func (srv *HttpServer) RegisterHandler(mux *ihttp.JsonHandlerMux)
- func (srv *HttpServer) SetLogger(logger *dlog.Logger)
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(meta meta.Provider, cfg config.ServerConfig) (*GrpcServer, error)
func (*GrpcServer) AgentHeartbeat ¶
func (srv *GrpcServer) AgentHeartbeat(ctx context.Context, req *pb.AgentHeartbeatReq) (*pb.AgentHeartbeatRes, error)
func (*GrpcServer) GetLogger ¶
func (srv *GrpcServer) GetLogger() *dlog.Logger
func (*GrpcServer) ListAgent ¶
func (srv *GrpcServer) ListAgent(ctx context.Context, req *pb.ListAgentReq) (*pb.ListAgentRes, error)
func (*GrpcServer) LoggerIdentity ¶
func (srv *GrpcServer) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*GrpcServer) NodeInfo ¶
func (srv *GrpcServer) NodeInfo(ctx context.Context, _ *pbc.NodeInfoReq) (*pbc.NodeInfoRes, error)
func (*GrpcServer) RegisterAgent ¶
func (srv *GrpcServer) RegisterAgent(ctx context.Context, req *pb.RegisterAgentReq) (*pb.RegisterAgentRes, error)
func (*GrpcServer) SetLogger ¶
func (srv *GrpcServer) SetLogger(logger *dlog.Logger)
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(meta meta.Provider, cfg config.ServerConfig) (*HttpServer, error)
func (*HttpServer) GetLogger ¶
func (srv *HttpServer) GetLogger() *dlog.Logger
func (*HttpServer) Handler ¶
func (srv *HttpServer) Handler() http.Handler
func (*HttpServer) ListAgent ¶
func (srv *HttpServer) ListAgent(ctx context.Context) (*pb.ListAgentRes, error)
func (*HttpServer) LoggerIdentity ¶
func (srv *HttpServer) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*HttpServer) NodeInfo ¶
func (srv *HttpServer) NodeInfo(ctx context.Context) (*pbc.NodeInfoRes, error)
func (*HttpServer) RegisterHandler ¶
func (srv *HttpServer) RegisterHandler(mux *ihttp.JsonHandlerMux)
func (*HttpServer) SetLogger ¶
func (srv *HttpServer) SetLogger(logger *dlog.Logger)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(cfg config.ServerConfig) (*Manager, error)
func (*Manager) LoggerIdentity ¶
Click to show internal directories.
Click to hide internal directories.