Documentation
¶
Index ¶
- Constants
- Variables
- func CamelToSnakeCase(name string) string
- func IsCloud(rawURL string) bool
- func IsDevMode() bool
- func IsHosted() bool
- func NodeName() string
- func WaitForAgent(ctx context.Context, room *lksdk.Room, agentName ...string) (*lksdk.RemoteParticipant, error)
- func WaitForParticipant(ctx context.Context, room *lksdk.Room, identity string, ...) (*lksdk.RemoteParticipant, error)
- func WaitForParticipantAttribute(ctx context.Context, room *lksdk.Room, identity string, attribute string, ...) error
- func WaitForTrackPublication(ctx context.Context, room *lksdk.Room, identity string, ...) (*lksdk.RemoteTrackPublication, error)
- func WaitForTrackPublicationWithOptions(ctx context.Context, room *lksdk.Room, options TrackPublicationWaitOptions) (*lksdk.RemoteTrackPublication, error)
- type BoundedDict
- func (c *BoundedDict[K, V]) Get(key K) (V, bool)
- func (c *BoundedDict[K, V]) PopIf(predicate func(V) bool) (K, V, bool)
- func (c *BoundedDict[K, V]) Set(key K, value V)
- func (c *BoundedDict[K, V]) SetOrUpdate(key K, factory func() V, update func(V) V) V
- func (c *BoundedDict[K, V]) UpdateValue(key K, update func(V) V) (V, bool)
- type ConnectionPool
- func (p *ConnectionPool[T]) Close(ctx context.Context) error
- func (p *ConnectionPool[T]) Get(ctx context.Context, timeout time.Duration) (T, error)
- func (p *ConnectionPool[T]) Invalidate()
- func (p *ConnectionPool[T]) Prewarm(ctx context.Context)
- func (p *ConnectionPool[T]) Put(conn T)
- func (p *ConnectionPool[T]) Remove(conn T)
- func (p *ConnectionPool[T]) WithConnection(ctx context.Context, timeout time.Duration, fn func(T) error) error
- type ConnectionPoolOptions
- type TrackPublicationWaitOptions
Constants ¶
View Source
const AttributeAgentName = "lk.agent.name"
Variables ¶
View Source
var ErrConnectionPoolNoConnect = errors.New("connection pool requires a connect callback")
Functions ¶
func CamelToSnakeCase ¶ added in v0.0.15
func WaitForAgent ¶
func WaitForParticipant ¶
func WaitForParticipant(ctx context.Context, room *lksdk.Room, identity string, kinds ...livekit.ParticipantInfo_Kind) (*lksdk.RemoteParticipant, error)
func WaitForParticipantAttribute ¶ added in v0.0.15
func WaitForTrackPublication ¶
func WaitForTrackPublicationWithOptions ¶ added in v0.0.15
func WaitForTrackPublicationWithOptions(ctx context.Context, room *lksdk.Room, options TrackPublicationWaitOptions) (*lksdk.RemoteTrackPublication, error)
Types ¶
type BoundedDict ¶
type BoundedDict[K comparable, V any] struct { // contains filtered or unexported fields }
func NewBoundedDict ¶
func NewBoundedDict[K comparable, V any](maxSize int) *BoundedDict[K, V]
func (*BoundedDict[K, V]) Get ¶
func (c *BoundedDict[K, V]) Get(key K) (V, bool)
func (*BoundedDict[K, V]) PopIf ¶ added in v0.0.15
func (c *BoundedDict[K, V]) PopIf(predicate func(V) bool) (K, V, bool)
func (*BoundedDict[K, V]) Set ¶
func (c *BoundedDict[K, V]) Set(key K, value V)
func (*BoundedDict[K, V]) SetOrUpdate ¶ added in v0.0.15
func (c *BoundedDict[K, V]) SetOrUpdate(key K, factory func() V, update func(V) V) V
func (*BoundedDict[K, V]) UpdateValue ¶ added in v0.0.15
func (c *BoundedDict[K, V]) UpdateValue(key K, update func(V) V) (V, bool)
type ConnectionPool ¶ added in v0.0.15
type ConnectionPool[T comparable] struct { LastAcquireTime time.Duration LastConnectionReused bool // contains filtered or unexported fields }
func NewConnectionPool ¶ added in v0.0.15
func NewConnectionPool[T comparable](opts ConnectionPoolOptions[T]) *ConnectionPool[T]
func (*ConnectionPool[T]) Close ¶ added in v0.0.15
func (p *ConnectionPool[T]) Close(ctx context.Context) error
func (*ConnectionPool[T]) Invalidate ¶ added in v0.0.15
func (p *ConnectionPool[T]) Invalidate()
func (*ConnectionPool[T]) Prewarm ¶ added in v0.0.15
func (p *ConnectionPool[T]) Prewarm(ctx context.Context)
func (*ConnectionPool[T]) Put ¶ added in v0.0.15
func (p *ConnectionPool[T]) Put(conn T)
func (*ConnectionPool[T]) Remove ¶ added in v0.0.15
func (p *ConnectionPool[T]) Remove(conn T)
func (*ConnectionPool[T]) WithConnection ¶ added in v0.0.15
type ConnectionPoolOptions ¶ added in v0.0.15
Click to show internal directories.
Click to hide internal directories.