Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogger ¶
func NewLogger(lc LoggerConfig) (logrus.FieldLogger, *os.File, error)
NewLogger provides a logrus FieldLogger.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents the stream REST API.
type APIConfig ¶
type APIConfig struct {
Port int
}
APIConfig represents the config necessary for stream API.
type AbortRequest ¶
type AbortRequest struct {
Checks []string `json:"checks"`
}
AbortRequest represents the body for an abort cheks request.
type LoggerConfig ¶
LoggerConfig defines required Vulcan Logger configuration.
type Message ¶
type Message struct { CheckID string `json:"check_id,omitempty"` AgentID string `json:"agent_id,omitempty"` ScanID string `json:"scan_id,omitempty"` Action string `json:"action"` }
Message describes a stream message
type RedisConfig ¶
RedisConfig specifies the required config for RedisStorage.
type RedisDB ¶
type RedisDB struct {
// contains filtered or unexported fields
}
RedisDB is the implementation of a RemoteDB for a Redis database.
func NewRedisDB ¶
func NewRedisDB(c RedisConfig) *RedisDB
NewRedisDB builds a new redis DB connector.
type RemoteDB ¶
type RemoteDB interface { GetChecks(ctx context.Context) ([]string, error) SetChecks(ctx context.Context, checks []string) error }
RemoteDB represents interface to interact with remote DB.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender defines a websocket event server
func NewSender ¶
func NewSender(l logrus.FieldLogger, c SenderConfig) *Sender
NewSender creates a Vulcan Stream sender instance
func (*Sender) HandleConn ¶
func (s *Sender) HandleConn(w http.ResponseWriter, r *http.Request)
HandleConn handles a connection to sender web socket topic.
type SenderConfig ¶
SenderConfig defines required Vulcan websocket event server configuration
type Storage ¶
type Storage interface { GetAbortedChecks(ctx context.Context) ([]string, error) AddAbortedChecks(ctx context.Context, checks []string) error }
Storage represents the stream storage for aborted checks.
func NewStorage ¶
func NewStorage(db RemoteDB, logger log.FieldLogger) (Storage, error)
NewStorage builds a new Storage.