file

package module
v0.0.0-...-1fdb7e3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package file implements a file-system producer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublisher

func NewPublisher(root string) (bps.Publisher, error)

NewPublisher inits a publisher within a root directory.

func NewSubscriber

func NewSubscriber(root string) bps.Subscriber

NewSubscriber inits a subscriber within a root directory. It assumes, that file is not being written to anymore. It starts handling from the first (oldest) available message. It iterates entire file (all records) without tracking processed messages.

Types

type SubTopic

type SubTopic string

SubTopic is an adapter for filename, that behaves like bps.SubTopic. Useful for testing.

func (SubTopic) Subscribe

func (t SubTopic) Subscribe(handler bps.Handler, options ...bps.SubOption) (bps.Subscription, error)

Subscribe subscribes/consumes records from file.

Jump to

Keyboard shortcuts

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