common

package
v0.0.0-...-7bbec54 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package common ...

Index

Constants

View Source
const (
	// ColorRed ...
	ColorRed = "\033[31m"
	// ColorGreen ...
	ColorGreen = "\033[32m"
	// ColorYellow ...
	ColorYellow = "\033[33m"
)
View Source
const (
	// CURRENTSTATE  resource path name
	CURRENTSTATE = "CurrentState"
)

Variables

This section is empty.

Functions

func DeleteSubscription

func DeleteSubscription(publisherURL string, clientID uuid.UUID) error

DeleteSubscription ... delete all subscription data

func GetCurrentState

func GetCurrentState(clientID uuid.UUID, publisherURL, resourceAddress string) (*cloudevents.Event, *cneevent.Data, error)

GetCurrentState ... get current ptp event state

func GetEventData

func GetEventData(url string) (*cloudevents.Event, *cneevent.Data, error)

GetEventData ... getter method

func GetResources

func GetResources() map[string]string

GetResources ... get resource types

func Post

func Post(address string, e cloudevents.Event) (int, error)

Post ...

func Print

func Print(color string, data string)

Print ...

func PrintEvent

func PrintEvent(data *cneevent.Data, eventType string, eTime time.Time)

PrintEvent ...

func PrintHeader

func PrintHeader()

PrintHeader ...

func StartServer

func StartServer(wg *sync.WaitGroup, clientAddress string, stopHTTPServerChan chan bool)

StartServer ... start event consumer application

func Subscribe

func Subscribe(clientID uuid.UUID, subs []pubsub.PubSub, nodeName, publisherURL, returnEndPoint string) error

Subscribe create subscription

Types

This section is empty.

Jump to

Keyboard shortcuts

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