Documentation ¶
Index ¶
- Constants
- func NewGRPC(ctx context.Context, config *config.EventConfig) *grpc.Server
- func StartGRPC(ctx context.Context, config *config.EventConfig) *grpc.Server
- type Server
- func (s *Server) Publish(ctx context.Context, req *api.PublishRequest) (*api.PublishResponse, error)
- func (s *Server) Start(ctx context.Context, req *api.StartRequest) (*api.StartResponse, error)
- func (s *Server) Stop(ctx context.Context, req *api.StopRequest) (*api.StopResponse, error)
- func (s *Server) Subscribe(ctx context.Context, req *api.SubscribeRequest) (*api.SubscribeResponse, error)
Constants ¶
View Source
const ( // supported event types ScanJobCreated = "scanJobCreated" ScanJobUpdated = "scanJobUpdated" ScanJobDeleted = "scanJobDeleted" ProfileCreated = "profileCreated" ProfileUpdated = "profileUpdate" ProfileDeleted = "profileDeleted" NodeTerminated = "nodeTerminated" ProjectRulesUpdate = "projectRulesUpdate" ProjectRulesUpdateFailed = "projectRulesUpdateFailed" ProjectRulesUpdateStatus = "projectRulesUpdateStatus" ProjectRulesCancelUpdate = "projectRulesCancelUpdate" )
TODO: @gcp move to config pkg
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *config.EventConfig) *Server
func (*Server) Publish ¶
func (s *Server) Publish(ctx context.Context, req *api.PublishRequest) (*api.PublishResponse, error)
func (*Server) Start ¶
func (s *Server) Start(ctx context.Context, req *api.StartRequest) (*api.StartResponse, error)
Starts the automate-event event listener loop
func (*Server) Stop ¶
func (s *Server) Stop(ctx context.Context, req *api.StopRequest) (*api.StopResponse, error)
Stops the automate-event listener loop
func (*Server) Subscribe ¶
func (s *Server) Subscribe(ctx context.Context, req *api.SubscribeRequest) (*api.SubscribeResponse, error)
Should take a reference to another service's client, which should have a HandleEvent method on it
Click to show internal directories.
Click to hide internal directories.