_3_observer

package
v0.0.0-...-24b7180 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Celebrity

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

This is the Subject

func (*Celebrity) Follow

func (o *Celebrity) Follow(responseCh chan Post)

Subscribe/Add to list of Observers

func (*Celebrity) Post

func (o *Celebrity) Post(post Post)

Notify all Observers

func (*Celebrity) Unfollow

func (o *Celebrity) Unfollow(in chan Post)

Unsubscribe/Remove from the list of Observers

type Post

type Post struct {
	Content string
}

type SuperFan

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

func NewSuperFan

func NewSuperFan() *SuperFan

func (*SuperFan) Watch

func (s *SuperFan) Watch()

Jump to

Keyboard shortcuts

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