provider

package
v0.0.0-...-df772b4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

Container struct

func NewContainer

func NewContainer() *Container

NewContainer constructor

func (*Container) AddProvider

func (c *Container) AddProvider(factory Factory) error

AddProvider to container

func (*Container) Get

func (c *Container) Get(name string) (Provider, error)

Get provider by name

func (*Container) LoadProvider

func (c *Container) LoadProvider(filename string) error

LoadProvider to container

func (*Container) LoadProviderDir

func (c *Container) LoadProviderDir(path string) error

LoadProviderDir to container

type Factory

type Factory func() Provider

Factory type

type Info

type Info struct {
	Name        string
	Version     string
	Description string
	Author      string
}

Info containts provider info

type Provider

type Provider interface {
	Info() Info
	Start(tile *config.Tile, messages bus.Writer) error
	Stop() error
}

Provider interface

Jump to

Keyboard shortcuts

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