example

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 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 {
	Message string
}

type Gun

type Gun struct {
	core.GunDeps
	// contains filtered or unexported fields
}

func NewGun

func NewGun() *Gun

func (*Gun) Bind

func (l *Gun) Bind(aggregator core.Aggregator, deps core.GunDeps) error

func (*Gun) Shoot

func (l *Gun) Shoot(a core.Ammo)

type Provider

type Provider struct {
	ProviderConfig
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(conf ProviderConfig) *Provider

func (*Provider) Acquire

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

func (*Provider) Release

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

func (*Provider) Run

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

type ProviderConfig

type ProviderConfig struct {
	AmmoLimit int `config:"limit"`
}

func DefaultProviderConfig added in v0.3.0

func DefaultProviderConfig() ProviderConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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