Skip to content

clients.mycelium #

fn get_msg_status #

fn get_msg_status(id string) !MessageStatusResponse

fn receive_msg #

fn receive_msg(wait bool) !InboundMessage

fn receive_msg_opt #

fn receive_msg_opt(wait bool) ?InboundMessage

fn reply_msg #

fn reply_msg(id string, pk string, payload string) !http.Status

fn send_msg #

fn send_msg(pk string, payload string, wait bool) !InboundMessage

struct InboundMessage #

struct InboundMessage {
pub:
	id      string
	src_ip  string @[json: 'srcIP']
	src_pk  string @[json: 'srcPk']
	dst_ip  string @[json: 'dstIp']
	dst_pk  string @[json: 'dstPk']
	payload string
}

struct MessageDestination #

struct MessageDestination {
pub:
	pk string
}

struct MessageStatusResponse #

struct MessageStatusResponse {
pub:
	id       string
	dst      string
	state    string
	created  string
	deadline string
	msg_len  string @[json: 'msgLen']
}

struct PushMessageBody #

struct PushMessageBody {
pub:
	dst     MessageDestination
	payload string
}