observer

package
v0.0.0-...-c3bd378 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback interface {
	Notify(o *Observable)
}

type Observable

type Observable struct {
	Name string
}

type Observer

type Observer struct {
}

func (*Observer) Notify

func (ob *Observer) Notify(o *Observable)

type Subject

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

func (*Subject) AddObserver

func (o *Subject) AddObserver(c Callback)

func (*Subject) DeleteObserver

func (o *Subject) DeleteObserver(c Callback)

func (*Subject) NotifyObservers

func (o *Subject) NotifyObservers(oes ...Observable)

Jump to

Keyboard shortcuts

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