server

package
v0.0.0-...-4b711b1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPC

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

NewGRPC creates the gRPC server.

func StartGRPC

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

StartGRPC starts the gRPC server

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.EventConfig) (*Server, error)

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