sinks

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RelayUserAgent = version.HttpString("call-relay")
)

Functions

func NewSinkManager

func NewSinkManager() *sinks

Types

type CallstoreSink

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

func NewCallstoreSink

func NewCallstoreSink(store callstore.Store, tgs tgstore.Store) *CallstoreSink

func (*CallstoreSink) Call

func (s *CallstoreSink) Call(ctx context.Context, call *calls.Call) error

func (*CallstoreSink) Name

func (s *CallstoreSink) Name() string

func (*CallstoreSink) SinkType

func (s *CallstoreSink) SinkType() string

type Flags

type Flags int
const (
	NoneFlag Flags = 0

	RequiredFlag Flags = 1 << iota
	AsyncFlag
)

func (Flags) Has

func (f Flags) Has(h Flags) bool

type NexusSink

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

func NewNexusSink

func NewNexusSink(nexus nexus.Nexus) *NexusSink

func (*NexusSink) Call

func (ns *NexusSink) Call(ctx context.Context, call *calls.Call) error

func (*NexusSink) Name

func (ns *NexusSink) Name() string

func (*NexusSink) SinkType

func (ns *NexusSink) SinkType() string

type Relay

type Relay struct {
	config.Relay
	// contains filtered or unexported fields
}

func (*Relay) Call

func (s *Relay) Call(ctx context.Context, call *calls.Call) (err error)

func (*Relay) Name

func (r *Relay) Name() string

func (*Relay) SinkType

func (s *Relay) SinkType() string

type RelayManager

type RelayManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRelayManager

func NewRelayManager(s Sinks, met metrics.Metrics, cfgs []config.Relay) (*RelayManager, error)

func (*RelayManager) HUP

func (rs *RelayManager) HUP(cfg *config.Config)

type Sink

type Sink interface {
	Call(context.Context, *calls.Call) error
	SinkType() string
	Name() string
}

type Sinks

type Sinks interface {
	Register(toAdd Sink, flags ...Flags)
	Unregister(Sink)
	Shutdown()
	EmitCall(ctx context.Context, call *calls.Call) error
}

Jump to

Keyboard shortcuts

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