Scaffold new system

This commit is contained in:
2025-10-23 01:57:26 +08:00
parent fc37796026
commit 37cbc78f9b
36 changed files with 41 additions and 4024 deletions

41
core/data/data.go Normal file
View File

@@ -0,0 +1,41 @@
// Package data ...
package data
import "time"
type Envelope struct {
Source string
Key string
Timestamp time.Time
Sequence uint64
Payload []byte
}
type Source interface {
Start() error
Stop()
Name() string
Subscribe(key string) (<-chan Envelope, error)
Unsubscribe(key string) error
IsValidKey(key string) bool
GetSubscriptions() []string
}
type Sink interface {
Start() error
Stop()
Publish(envelope Envelope) error
}
type Processor interface {
Start(context ProcessorContext) error
Stop()
}
type ProcessorContext interface {
Send(inPort string, messsage Envelope) error
Receive(outPort string) Envelope
}

View File

View File

0
core/risk/risk.go Normal file
View File

View File

0
core/worker/worker.go Normal file
View File