stats

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 9 Imported by: 12

Documentation

Overview

Package stats defines an interface to access statistical information for troubleshooting and monitoring purposes.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValue = verror.NewIDAction("v.io/v23/services/stats.NoValue", verror.NoRetry)
)
View Source
var StatsDesc rpc.InterfaceDesc = descStats

StatsDesc describes the Stats interface.

Functions

func ErrorfNoValue added in v0.1.10

func ErrorfNoValue(ctx *context.T, format string, suffix string) error

ErrorfNoValue calls ErrNoValue.Errorf with the supplied arguments.

func MessageNoValue added in v0.1.10

func MessageNoValue(ctx *context.T, message string, suffix string) error

MessageNoValue calls ErrNoValue.Message with the supplied arguments.

func ParamsErrNoValue added in v0.1.10

func ParamsErrNoValue(argumentError error) (verrorComponent string, verrorOperation string, suffix string, returnErr error)

ParamsErrNoValue extracts the expected parameters from the error's ParameterList.

Types

type StatsClientMethods

type StatsClientMethods interface {
	// GlobWatcher allows a client to receive updates for changes to objects
	// that match a pattern.  See the package comments for details.
	watch.GlobWatcherClientMethods
	// Value returns the current value of an object, or an error. The type
	// of the value is implementation specific.
	// Some objects may not have a value, in which case, Value() returns
	// a NoValue error.
	Value(*context.T, ...rpc.CallOpt) (*vom.RawBytes, error)
}

StatsClientMethods is the client interface containing Stats methods.

The Stats interface is used to access stats for troubleshooting and monitoring purposes. The stats objects are discoverable via the Globbable interface and watchable via the GlobWatcher interface.

The types of the object values are implementation specific, but should be primarily numeric in nature, e.g. counters, memory usage, latency metrics, etc.

type StatsClientStub

type StatsClientStub interface {
	StatsClientMethods
}

StatsClientStub embeds StatsClientMethods and is a placeholder for additional management operations.

func StatsClient

func StatsClient(name string) StatsClientStub

StatsClient returns a client stub for Stats.

type StatsServerMethods

type StatsServerMethods interface {
	// GlobWatcher allows a client to receive updates for changes to objects
	// that match a pattern.  See the package comments for details.
	watch.GlobWatcherServerMethods
	// Value returns the current value of an object, or an error. The type
	// of the value is implementation specific.
	// Some objects may not have a value, in which case, Value() returns
	// a NoValue error.
	Value(*context.T, rpc.ServerCall) (*vom.RawBytes, error)
}

StatsServerMethods is the interface a server writer implements for Stats.

The Stats interface is used to access stats for troubleshooting and monitoring purposes. The stats objects are discoverable via the Globbable interface and watchable via the GlobWatcher interface.

The types of the object values are implementation specific, but should be primarily numeric in nature, e.g. counters, memory usage, latency metrics, etc.

type StatsServerStub

type StatsServerStub interface {
	StatsServerStubMethods
	// DescribeInterfaces the Stats interfaces.
	Describe__() []rpc.InterfaceDesc
}

StatsServerStub adds universal methods to StatsServerStubMethods.

func StatsServer

func StatsServer(impl StatsServerMethods) StatsServerStub

StatsServer returns a server stub for Stats. It converts an implementation of StatsServerMethods into an object that may be used by rpc.Server.

type StatsServerStubMethods

type StatsServerStubMethods interface {
	// GlobWatcher allows a client to receive updates for changes to objects
	// that match a pattern.  See the package comments for details.
	watch.GlobWatcherServerStubMethods
	// Value returns the current value of an object, or an error. The type
	// of the value is implementation specific.
	// Some objects may not have a value, in which case, Value() returns
	// a NoValue error.
	Value(*context.T, rpc.ServerCall) (*vom.RawBytes, error)
}

StatsServerStubMethods is the server interface containing Stats methods, as expected by rpc.Server. The only difference between this interface and StatsServerMethods is the streaming methods.

Jump to

Keyboard shortcuts

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