sap

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

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

func NewSource

func NewSource(config SourceConfig, logger hermod.Logger) *Source

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, msg hermod.Message) error

Ack moves the persisted cursor to the acknowledged record. It must not move on read: GetState is the engine's persistence contract, so a cursor advanced when a record is handed out is already past records still in flight, and a crash before the sinks wrote them erases them from the resume.

func (*Source) Close

func (s *Source) Close() error

func (*Source) GetState

func (s *Source) GetState() map[string]string

func (*Source) Name

func (s *Source) Name() string

func (*Source) Ping

func (s *Source) Ping(ctx context.Context) error

func (*Source) Read

func (s *Source) Read(ctx context.Context) (hermod.Message, error)

func (*Source) SetState

func (s *Source) SetState(state map[string]string)

type SourceConfig

type SourceConfig struct {
	Host         string `json:"host"`
	Client       string `json:"client"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
	Service      string `json:"service"` // OData Service
	Entity       string `json:"entity"`  // OData Entity
	PollInterval string `json:"poll_interval"`
	Filter       string `json:"filter,omitempty"`   // OData $filter
	IDField      string `json:"id_field,omitempty"` // Field to use for delta tracking
}

Jump to

Keyboard shortcuts

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