ammo

package
v0.5.23 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ammo

type Ammo struct {
	Tag      string                 `json:"tag"`
	Call     string                 `json:"call"`
	Metadata map[string]string      `json:"metadata"`
	Payload  map[string]interface{} `json:"payload"`
	// contains filtered or unexported fields
}

func (*Ammo) ID

func (a *Ammo) ID() uint64

func (*Ammo) Invalidate

func (a *Ammo) Invalidate()

func (*Ammo) IsInvalid

func (a *Ammo) IsInvalid() bool

func (*Ammo) IsValid

func (a *Ammo) IsValid() bool

func (*Ammo) Reset

func (a *Ammo) Reset(tag string, call string, metadata map[string]string, payload map[string]interface{})

func (*Ammo) SetID

func (a *Ammo) SetID(id uint64)

type Provider

type Provider struct {
	Sink chan *Ammo
	Pool sync.Pool

	Close func()
	core.ProviderDeps
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(fs afero.Fs, fileName string, start func(ctx context.Context, file afero.File) error) Provider

func (*Provider) Acquire

func (p *Provider) Acquire() (core.Ammo, bool)

func (*Provider) Release

func (p *Provider) Release(a core.Ammo)

func (*Provider) Run

func (p *Provider) Run(ctx context.Context, deps core.ProviderDeps) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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