types

package
v5.0.0-garthoid8 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmassRangerEntry

type AmassRangerEntry interface {
	Network() net.IPNet
	AutonomousSystem() int
	Source() *Source
}

type Asset

type Asset struct {
	Session uuid.UUID `json:"sessionToken,omitempty"`
	Name    string    `json:"assetName,omitempty"`
	Data    AssetData `json:"data,omitempty"`
}

type AssetData

type AssetData struct {
	OAMAsset oam.Asset     `json:"asset"`
	OAMType  oam.AssetType `json:"type"`
}

type AssetPipeline

type AssetPipeline struct {
	Pipeline *pipeline.Pipeline
	Queue    *PipelineQueue
}

type Dispatcher

type Dispatcher interface {
	DispatchEvent(e *Event) error
	Shutdown()
}

type EmailMeta

type EmailMeta struct {
	VerifyAttempted bool
	Verified        bool
}

type Event

type Event struct {
	Name       string
	Entity     *dbt.Entity
	Meta       interface{}
	Dispatcher Dispatcher
	Session    Session
}

type EventDataElement

type EventDataElement struct {
	Event *Event
	Error error
	Queue chan *EventDataElement
}

func NewEventDataElement

func NewEventDataElement(e *Event) *EventDataElement

func (*EventDataElement) Clone

func (ede *EventDataElement) Clone() pipeline.Data

type Handler

type Handler struct {
	Plugin       Plugin
	Name         string
	Priority     int
	MaxInstances int
	EventType    oam.AssetType
	Transforms   []string
	Callback     func(*Event) error
}

type PipelineQueue

type PipelineQueue struct {
	queue.Queue
}

func NewPipelineQueue

func NewPipelineQueue() *PipelineQueue

func (*PipelineQueue) Data

func (pq *PipelineQueue) Data() pipeline.Data

Data implements the pipeline InputSource interface.

func (*PipelineQueue) Error

func (pq *PipelineQueue) Error() error

Error implements the pipeline InputSource interface.

func (*PipelineQueue) Next

func (pq *PipelineQueue) Next(ctx context.Context) bool

Next implements the pipeline InputSource interface.

type Plugin

type Plugin interface {
	Name() string
	Start(r Registry) error
	Stop()
}

type Registry

type Registry interface {
	Log() *slog.Logger
	RegisterHandler(h *Handler) error
	BuildPipelines() error
	GetPipeline(eventType oam.AssetType) (*AssetPipeline, error)
}

type Session

type Session interface {
	ID() uuid.UUID
	Log() *slog.Logger
	PubSub() *pubsub.Logger
	Config() *config.Config
	Scope() *scope.Scope
	DB() repository.Repository
	Cache() *cache.Cache
	Queue() SessionQueue
	CIDRanger() cidranger.Ranger
	TmpDir() string
	Stats() *SessionStats
	Done() bool
	Kill()
}

type SessionManager

type SessionManager interface {
	NewSession(cfg *config.Config) (Session, error)
	AddSession(s Session) error
	CancelSession(id uuid.UUID)
	GetSession(id uuid.UUID) Session
	GetSessions() []Session
	Shutdown()
}

type SessionQueue

type SessionQueue interface {
	Has(e *dbt.Entity) bool
	Append(e *dbt.Entity) error
	Next(atype oam.AssetType, num int) ([]*dbt.Entity, error)
	Processed(e *dbt.Entity) error
	Delete(e *dbt.Entity) error
	Close() error
}

type SessionStats

type SessionStats struct {
	sync.Mutex
	WorkItemsCompleted int `json:"workItemsCompleted"`
	WorkItemsTotal     int `json:"workItemsTotal"`
}

type Source

type Source struct {
	Name       string
	Confidence int
}

Jump to

Keyboard shortcuts

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