server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Node

func Node(cfg config.ServerConfig) (*pbc.Node, error)

TODO: this is dup in both agent and central

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) Ping

func (srv *GrpcServer) Ping(ctx context.Context, ping *pbc.Ping) (*pbc.Pong, 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) Ping

func (srv *HttpServer) Ping(ctx context.Context, ping *pbc.Ping) (*pbc.Pong, 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) GetLogger

func (mgr *Manager) GetLogger() *dlog.Logger

func (*Manager) LoggerIdentity

func (mgr *Manager) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity

func (*Manager) Run

func (mgr *Manager) Run() error

func (*Manager) SetLogger

func (mgr *Manager) SetLogger(logger *dlog.Logger)

Jump to

Keyboard shortcuts

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