reproxystatus

package
v0.0.0-...-8594b39 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package reproxystatus provides a human-readable formatted status for running reproxy instances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompletedActionsSummary

func CompletedActionsSummary(stats map[string]int32) string

CompletedActionsSummary returns a human readable summary of completed actions grouped by their completion status.

func PrintSummaries

func PrintSummaries(ctx context.Context, writer io.Writer, tracker ReproxyTracker)

PrintSummaries calls updates the tracker then fetches and prints all summaries from the connected reproxy instances.

Types

type ReproxyTracker

type ReproxyTracker interface {
	FetchAllStatusSummaries(ctx context.Context) []*Summary
}

ReproxyTracker manages connections to reproxy instances

type SingleReproxyTracker

type SingleReproxyTracker struct {
	ServerAddress string
	// contains filtered or unexported fields
}

SingleReproxyTracker manages a connection to a single reproxy instance listening on ServerAddress

func (*SingleReproxyTracker) FetchAllStatusSummaries

func (rt *SingleReproxyTracker) FetchAllStatusSummaries(ctx context.Context) []*Summary

FetchAllStatusSummaries a Summary the reproxy instance at ServerAddress.

type SocketReproxyTracker

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

SocketReproxyTracker manages connections to all reproxy instances listening on unix sockets or windows pipes.

func (*SocketReproxyTracker) FetchAllStatusSummaries

func (rt *SocketReproxyTracker) FetchAllStatusSummaries(ctx context.Context) []*Summary

FetchAllStatusSummaries returns a list of Summary for each client in statusClients sorted by key.

type Summary

type Summary struct {
	Addr string
	Resp *ppb.GetStatusSummaryResponse
	Err  error
}

Summary describes the result of calling Status.GetStatusSummary on a reproxy instance at Addr.

func (*Summary) HumanReadable

func (s *Summary) HumanReadable() string

HumanReadable formats Summary into a human-readable format.

Jump to

Keyboard shortcuts

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