app

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OTLServiceName = "events-gateway"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Server *Server // tests manipulate this field
	// contains filtered or unexported fields
}

App is the app structure

func NewApp

func NewApp(host string, port int, log logger.Logger, config *viper.Viper) (*App, error)

NewApp creates a new App object

func (*App) Run

func (a *App) Run()

Run runs the app

func (*App) Stop

func (a *App) Stop()

type Server

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

Server struct

func NewServer

func NewServer(sender sender.Sender, logger logger.Logger) *Server

NewServer returns a new grpc server

func (*Server) SendEvent

func (s *Server) SendEvent(
	ctx context.Context,
	req *pb.Event,
) (*pb.SendEventResponse, error)

func (*Server) SendEvents

func (s *Server) SendEvents(
	ctx context.Context,
	req *pb.SendEventsRequest,
) (*pb.SendEventsResponse, error)

SendEvents response might include FailureIndexes in case producer fails to send all events

Jump to

Keyboard shortcuts

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