source

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package source is a pluggable event source abstraction (separate package to keep business registrations free of SDK transitive deps).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s Source)

func ResetForTest

func ResetForTest()

Types

type FeishuSource

type FeishuSource struct {
	AppID     string
	AppSecret string
	Domain    string
	Logger    *log.Logger
}

func (*FeishuSource) Name

func (s *FeishuSource) Name() string

func (*FeishuSource) Start

func (s *FeishuSource) Start(ctx context.Context, eventTypes []string, emit func(*event.RawEvent), notify StatusNotifier) error

type Source

type Source interface {
	Name() string
	Start(ctx context.Context, eventTypes []string, emit func(*event.RawEvent), notify StatusNotifier) error
}

Source produces events; emit MUST return quickly (anything slow stalls the SDK read loop).

func All

func All() []Source

type StatusNotifier

type StatusNotifier func(state, detail string)

StatusNotifier surfaces SourceState* lifecycle states; detail is free-form context.

Jump to

Keyboard shortcuts

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