centralhub

package
v0.0.0-...-b59b4a3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CentralHub

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

func GetHubInstance

func GetHubInstance(hubID string, location string) *CentralHub

Initialize with Values

func GetHubInstanceDefault

func GetHubInstanceDefault() *CentralHub

Singleton Pattern

func (*CentralHub) GetHubID

func (h *CentralHub) GetHubID() string

Getters

func (*CentralHub) GetLocation

func (h *CentralHub) GetLocation() string

func (*CentralHub) GetNumberOfProducts

func (h *CentralHub) GetNumberOfProducts(productName string) int

func (*CentralHub) HandleEventNotification

func (h *CentralHub) HandleEventNotification(event string, shopInventory map[string]*product.Product) *Response

HandleEventNotification responds to an event by determining necessary product replenishments

type Response

type Response struct {
	Replenishments map[string]int // Key is the name of the product, value is the number of products to replenish
	Error          error
}

Jump to

Keyboard shortcuts

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