service

package
v0.0.0-...-5aa5535 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConsumer = errors.New("invalid consumer")
	ErrRecordNotFound  = errors.New("no record found")
)
View Source
var (
	DefaultBytesDistribution        = []float64{1024, 2048, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296}
	DefaultMillisecondsDistribution = []float64{0.01, 0.05, 0.1, 0.3, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 25, 30, 40, 50, 65, 80, 100, 130, 160, 200, 250, 300, 400, 500, 650, 800, 1000, 2000, 5000, 10000, 20000, 50000, 100000}
	DefaultMicrosecondsDistribution = []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000}
	DefaultMessageCountDistribution = []float64{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}
)

0 5 10 25 50 75 100 250 500 750 1000 2500 5000 7500 10000

View Source
var (
	ErrInvalidPeerSet = errors.New("invalid peers")
)
View Source
var (
	ErrNotLeader = errors.New("node is not the leader")
)

Functions

func CalculateLag

func CalculateLag(ctx context.Context, store store.Store)

func CalculateVisibleRecords

func CalculateVisibleRecords(ctx context.Context, store store.Store)

func MetricsInterceptor

func MetricsInterceptor() connect.UnaryInterceptorFunc

func New

func New(store store.Store, cfg *config.Config) (*service, error)

func NewIntegration

func NewIntegration(s *service) *integration

func NewLogInterceptor

func NewLogInterceptor() connect.UnaryInterceptorFunc

func ToStructValue

func ToStructValue(item interface{}) (*structpb.Value, error)

Types

type Event

type Event interface {
	EventType() EventType
}

type EventType

type EventType int
const (
	EventServerListening EventType = iota
	EventServerStopped
)

type ServerEvent

type ServerEvent struct {
	Type EventType
}

func (ServerEvent) EventType

func (m ServerEvent) EventType() EventType

Jump to

Keyboard shortcuts

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