Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const ZitiSession = "zt-session"

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func NewAgent

func NewAgent(cfg *AgentConfig, str *store.Store, ifxCfg *InfluxConfig) (*Agent, error)

func (*Agent) AddUsageSink

func (a *Agent) AddUsageSink(snk UsageSink)

func (*Agent) Start

func (a *Agent) Start() error

func (*Agent) Stop

func (a *Agent) Stop()

type AgentConfig

type AgentConfig struct {
	Source              interface{}
	RetryAttempts       int
	RetryInitialBackoff time.Duration
	RetryMaxBackoff     time.Duration
	RetryBudget         time.Duration
}

type AmqpSinkConfig

type AmqpSinkConfig struct {
	Url       string `cf:"+secret"`
	QueueName string
}

type AmqpSourceConfig

type AmqpSourceConfig struct {
	Url       string `cf:"+secret"`
	QueueName string
	Prefetch  int
}

type Bridge

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

func NewBridge

func NewBridge(cfg *BridgeConfig) (*Bridge, error)

func (*Bridge) Start

func (b *Bridge) Start() (join chan struct{}, err error)

func (*Bridge) Stop

func (b *Bridge) Stop()

type BridgeConfig

type BridgeConfig struct {
	Source interface{}
	Sink   interface{}
}

type Config

type Config struct {
	Influx *InfluxConfig
	Agent  *AgentConfig
}

type FileSourceConfig

type FileSourceConfig struct {
	Path        string
	PointerPath string
}

type InfluxConfig

type InfluxConfig struct {
	Url          string
	Bucket       string
	Org          string
	Token        string `cf:"+secret"`
	WriteTimeout time.Duration
}

type Usage

type Usage struct {
	ProcessedStamp time.Time
	IntervalStart  time.Time
	ZitiServiceId  string
	ZitiCircuitId  string
	ShareToken     string
	EnvironmentId  int64
	AccountId      int64
	FrontendTx     int64
	FrontendRx     int64
	BackendTx      int64
	BackendRx      int64
}

func Ingest

func Ingest(event ZitiEventJson) (*Usage, error)

func (Usage) String

func (u Usage) String() string

type UsageSink

type UsageSink interface {
	Handle(u *Usage) error
}

type WebsocketSourceConfig

type WebsocketSourceConfig struct {
	WebsocketEndpoint string // wss://127.0.0.1:1280/fabric/v1/ws-api
	ApiEndpoint       string // https://127.0.0.1:1280
	Username          string
	Password          string `cf:"+secret"`
}

type ZitiEventAMQP

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

func (*ZitiEventAMQP) Ack

func (e *ZitiEventAMQP) Ack() error

func (*ZitiEventAMQP) Data

func (e *ZitiEventAMQP) Data() ZitiEventJson

func (*ZitiEventAMQP) Nack added in v1.1.12

func (e *ZitiEventAMQP) Nack(requeue bool) error

type ZitiEventJson

type ZitiEventJson string

type ZitiEventJsonMsg

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

func (*ZitiEventJsonMsg) Ack

func (e *ZitiEventJsonMsg) Ack() error

func (*ZitiEventJsonMsg) Data

func (e *ZitiEventJsonMsg) Data() ZitiEventJson

func (*ZitiEventJsonMsg) Nack added in v1.1.12

func (e *ZitiEventJsonMsg) Nack(bool) error

type ZitiEventJsonSink

type ZitiEventJsonSink interface {
	Handle(event ZitiEventJson) error
}

type ZitiEventJsonSource

type ZitiEventJsonSource interface {
	Start(chan ZitiEventMsg) (join chan struct{}, err error)
	Stop()
}

type ZitiEventMsg

type ZitiEventMsg interface {
	Data() ZitiEventJson
	Ack() error
	Nack(requeue bool) error
}

Jump to

Keyboard shortcuts

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