Documentation
¶
Index ¶
- func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager
- func SetLogger(l *zap.SugaredLogger)
- type AlertDispatcher
- type ConfigServer
- func (cs *ConfigServer) AddConstraint(ctx context.Context, request *tarianpb.AddConstraintRequest) (*tarianpb.AddConstraintResponse, error)
- func (cs *ConfigServer) GetConstraints(ctx context.Context, request *tarianpb.GetConstraintsRequest) (*tarianpb.GetConstraintsResponse, error)
- func (cs *ConfigServer) RemoveConstraint(ctx context.Context, request *tarianpb.RemoveConstraintRequest) (*tarianpb.RemoveConstraintResponse, error)
- type EventServer
- type PostgresqlConfig
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAlertmanagerClient ¶
func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager
func SetLogger ¶
func SetLogger(l *zap.SugaredLogger)
Types ¶
type AlertDispatcher ¶
type AlertDispatcher struct {
// contains filtered or unexported fields
}
func NewAlertDispatcher ¶
func NewAlertDispatcher(amURL *url.URL, alertEvaluationInterval time.Duration) *AlertDispatcher
func (*AlertDispatcher) LoopSendAlerts ¶
func (a *AlertDispatcher) LoopSendAlerts(ctx context.Context, es store.EventStore)
type ConfigServer ¶
type ConfigServer struct {
tarianpb.UnimplementedConfigServer
// contains filtered or unexported fields
}
func NewConfigServer ¶
func NewConfigServer(dsn string) (*ConfigServer, error)
func (*ConfigServer) AddConstraint ¶
func (cs *ConfigServer) AddConstraint(ctx context.Context, request *tarianpb.AddConstraintRequest) (*tarianpb.AddConstraintResponse, error)
func (*ConfigServer) GetConstraints ¶
func (cs *ConfigServer) GetConstraints(ctx context.Context, request *tarianpb.GetConstraintsRequest) (*tarianpb.GetConstraintsResponse, error)
func (*ConfigServer) RemoveConstraint ¶
func (cs *ConfigServer) RemoveConstraint(ctx context.Context, request *tarianpb.RemoveConstraintRequest) (*tarianpb.RemoveConstraintResponse, error)
type EventServer ¶
type EventServer struct {
tarianpb.UnimplementedEventServer
// contains filtered or unexported fields
}
func NewEventServer ¶
func NewEventServer(dsn string) (*EventServer, error)
func (*EventServer) GetEvents ¶
func (es *EventServer) GetEvents(ctxt context.Context, request *tarianpb.GetEventsRequest) (*tarianpb.GetEventsResponse, error)
func (*EventServer) IngestEvent ¶
func (es *EventServer) IngestEvent(ctx context.Context, request *tarianpb.IngestEventRequest) (*tarianpb.IngestEventResponse, error)
type PostgresqlConfig ¶
type PostgresqlConfig struct {
User string `default:"postgres"`
Password string `default:"tarian"`
DbName string `default:"tarian"`
Host string `default:"localhost"`
Port string `default:"5432"`
SslMode string `default:"disable"`
}
func (*PostgresqlConfig) GetDsn ¶
func (p *PostgresqlConfig) GetDsn() string
type Server ¶
type Server struct {
GrpcServer *grpc.Server
EventServer *EventServer
ConfigServer *ConfigServer
AlertDispatcher *AlertDispatcher
// contains filtered or unexported fields
}
func (*Server) StartAlertDispatcher ¶
func (s *Server) StartAlertDispatcher()
Click to show internal directories.
Click to hide internal directories.