Documentation ¶
Index ¶
- type CachedStorage
- type FarmClient
- type Metrics
- type Server
- func (s *Server) BroadcastCommand(ctx context.Context, r *epb.BroadcastRequest) (*epb.BroadcastResponse, error)
- func (s *Server) BroadcastSubscribe(r *epb.BroadcastSubscribeRequest, stream epb.Service_BroadcastSubscribeServer) error
- func (s *Server) Exploit(ctx context.Context, r *epb.ExploitRequest) (*epb.ExploitResponse, error)
- func (s *Server) HeartBeat(ctx context.Context)
- func (s *Server) Ping(ctx context.Context, r *epb.PingRequest) (*epb.PingResponse, error)
- func (s *Server) SingleRun(ctx context.Context, r *epb.SingleRunRequest) (*epb.SingleRunResponse, error)
- func (s *Server) SingleRunSubscribe(r *epb.SingleRunSubscribeRequest, stream epb.Service_SingleRunSubscribeServer) error
- func (s *Server) UpdateConfig(cfg *serverConfig.Config)
- func (s *Server) UpdateExploit(ctx context.Context, r *epb.UpdateExploitRequest) (*epb.UpdateExploitResponse, error)
- func (s *Server) UpdateMetrics(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedStorage ¶
type CachedStorage struct {
// contains filtered or unexported fields
}
func NewBoltStorage ¶
func NewBoltStorage(path string) (*CachedStorage, error)
func NewStorage ¶
func NewStorage(db *bolt.DB) (*CachedStorage, error)
func (*CachedStorage) GetState ¶
func (cs *CachedStorage) GetState(exploitID string) (*epb.ExploitState, bool)
func (*CachedStorage) States ¶
func (cs *CachedStorage) States() []*epb.ExploitState
func (*CachedStorage) UpdateExploitVersion ¶
func (cs *CachedStorage) UpdateExploitVersion(newState *epb.ExploitState) (*epb.ExploitState, error)
type FarmClient ¶
type FarmClient struct {
// contains filtered or unexported fields
}
func NewFarmClient ¶
func NewFarmClient(cfg config.FarmConfig) *FarmClient
func (*FarmClient) FillConfig ¶
func (fc *FarmClient) FillConfig(ctx context.Context, cfg *config.FarmConfig) error
type Server ¶
type Server struct { epb.UnimplementedServiceServer common.LoggingServer // contains filtered or unexported fields }
func New ¶
func New(cfg *serverConfig.Config, storage *CachedStorage) *Server
func (*Server) BroadcastCommand ¶
func (s *Server) BroadcastCommand(ctx context.Context, r *epb.BroadcastRequest) (*epb.BroadcastResponse, error)
func (*Server) BroadcastSubscribe ¶
func (s *Server) BroadcastSubscribe(r *epb.BroadcastSubscribeRequest, stream epb.Service_BroadcastSubscribeServer) error
func (*Server) Exploit ¶
func (s *Server) Exploit(ctx context.Context, r *epb.ExploitRequest) (*epb.ExploitResponse, error)
func (*Server) Ping ¶
func (s *Server) Ping(ctx context.Context, r *epb.PingRequest) (*epb.PingResponse, error)
func (*Server) SingleRun ¶
func (s *Server) SingleRun(ctx context.Context, r *epb.SingleRunRequest) (*epb.SingleRunResponse, error)
func (*Server) SingleRunSubscribe ¶
func (s *Server) SingleRunSubscribe(r *epb.SingleRunSubscribeRequest, stream epb.Service_SingleRunSubscribeServer) error
func (*Server) UpdateConfig ¶
func (s *Server) UpdateConfig(cfg *serverConfig.Config)
func (*Server) UpdateExploit ¶
func (s *Server) UpdateExploit(ctx context.Context, r *epb.UpdateExploitRequest) (*epb.UpdateExploitResponse, error)
func (*Server) UpdateMetrics ¶
Click to show internal directories.
Click to hide internal directories.