status

package
v2.14.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module is a fx module that provides a status Registry and registers status service handlers as grpc-gateway handlers.

func NewStatus

func NewStatus(d proto.Message, e error) *statusv1.Status

NewStatus creates a new instance of Status to be pushed into status registry. Use this function for creating status instead of by hand.

func ParseGroupStatus added in v2.12.0

func ParseGroupStatus(statusMap map[string]string, parent string, resp *statusv1.GroupStatus) (map[string]string, error)

ParseGroupStatus parses GroupStatus response and returns a map of status path to value.

func RegisterStatusService

func RegisterStatusService(server *grpc.Server, svc *StatusService)

RegisterStatusService registers the StatusService implementation with the provided grpc server.

Types

type Registry

type Registry interface {
	GetStatus() *statusv1.Status
	SetStatus(*statusv1.Status)
	SetGroupStatus(*statusv1.GroupStatus)
	GetGroupStatus() *statusv1.GroupStatus
	Child(key, value string) Registry
	ChildIfExists(key, value string) Registry
	Parent() Registry
	Root() Registry
	Detach()
	Key() string
	Value() string
	URI() string
	HasError() bool
	GetLogger() *log.Logger
	GetAlerter() alerts.Alerter
}

Registry .

func NewRegistry

func NewRegistry(logger *log.Logger, alerter alerts.Alerter) Registry

NewRegistry creates a new Registry.

type StatusService

type StatusService struct {
	statusv1.UnimplementedStatusServiceServer
	// contains filtered or unexported fields
}

StatusService is the implementation of the statusv1.StatusServiceServer interface.

func ProvideStatusService added in v2.11.0

func ProvideStatusService(server *grpc.Server, reg Registry) *StatusService

ProvideStatusService provides a StatusService implementation.

func (*StatusService) GetGroupStatus

GetGroupStatus returns the group status for the requested group in the Registry.

Jump to

Keyboard shortcuts

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