Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackIgnT ¶
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