observer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObserverFn added in v0.0.15

type ObserverFn = func(*models.ClusterState) error

type Subject

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

func NewSubject

func NewSubject() *Subject

func (*Subject) AddObserver

func (s *Subject) AddObserver(observer ObserverFn)

AddObserver adds a new observer function

func (*Subject) Notify

func (s *Subject) Notify(state *models.ClusterState) error

Notify all observers

Jump to

Keyboard shortcuts

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