server

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func NewGRPC

func NewGRPC(ctx context.Context, config *config.EventConfig) *grpc.Server

NewGRPC creates the gRPC server.

func StartGRPC

func StartGRPC(ctx context.Context, config *config.EventConfig) *grpc.Server

StartGRPC starts the gRPC server

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

Jump to

Keyboard shortcuts

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