igntransport

package
v0.0.0-...-70b330c Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackIgnT

type CallbackIgnT struct {
	Func func([]byte, string)
}

CallbackIgnT is a wrapper type for callback functions for ign-transport C interface.

type GoIgnTransportNode

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

GoIgnTransportNode is the Go type we use to interact with our C api. It represents an ign-transport node.

func NewIgnTransportNode

func NewIgnTransportNode(partition *string) (*GoIgnTransportNode, error)

NewIgnTransportNode creates a new ignition transport node.

func (*GoIgnTransportNode) Free

func (ign *GoIgnTransportNode) Free()

Free helps freeing C memory Note: you should have unsubscribed from all topics before invoking this func.

func (*GoIgnTransportNode) IgnTransportPublishStringMsg

func (ign *GoIgnTransportNode) IgnTransportPublishStringMsg(topic, msg string) error

IgnTransportPublishStringMsg publishes a message to a topic.

func (*GoIgnTransportNode) IgnTransportSubscribe

func (ign *GoIgnTransportNode) IgnTransportSubscribe(topic string, cb func([]byte, string)) error

IgnTransportSubscribe registers a callback in C. It does this by wrapping the cb function and passes userdata into a Callback struct, and actually passing a pointer to that struct to C. It is expected that the C code will run a callback of type *void.

func (*GoIgnTransportNode) IgnTransportUnsubscribe

func (ign *GoIgnTransportNode) IgnTransportUnsubscribe(topic string) error

IgnTransportUnsubscribe unsubscribes from a topic

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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