observer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Name   string
	File   string
	Error  error
	Result string
}

type Observer

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

func New

func New() *Observer

func (*Observer) AddSubscriber

func (o *Observer) AddSubscriber(s Subscriber)

func (*Observer) Publish

func (o *Observer) Publish(event Event)

func (*Observer) PublishError

func (o *Observer) PublishError(event, file string, err error)

func (*Observer) PublishResult

func (o *Observer) PublishResult(event, file, result string)

type Subscriber

type Subscriber interface {
	Notify(Event)
}

Jump to

Keyboard shortcuts

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