register

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package register contains the RegistrationMessage and all helper methods for generating the message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

Message is a struct that wraps the information required for an api.RegisterMessage to be sent.

func New

func New(
	cfg config.Conf,
	hostName, version, buildDate, gitHash string,
	checkList checks.Checks,
	startTime time.Time,
) *Message

New returns a Message pre-populated.

func (*Message) Member

func (msg *Message) Member() *api.Member

Member returns the member details used in the api.RegisterMessage.

func (*Message) Message

func (msg *Message) Message() *api.RegisterMessage

Message returns the actual api.RegisterMessage.

func (*Message) UpdateInfoStat

func (msg *Message) UpdateInfoStat(ctx context.Context)

UpdateInfoStat updates the infostat on the member.

func (*Message) UpdateMessage

func (msg *Message) UpdateMessage() *api.MemberUpdateMessage

UpdateMessage returns the actual api.MemberUpdateMessage.

Jump to

Keyboard shortcuts

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