lib_pulses_sender

package
v0.0.0-...-215c2c3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PULSE_RQ_MAKER string = "PULSE_RQ_MAKER"
View Source
const PULSE_RS_PROCESSOR string = "PULSE_RS_PROCESSOR"

Variables

View Source
var DEFAULT_RSINSTANCEGETTER lib_send_channel_adapter.PulseRSInstanceGetter = func() PROTO.Message {
	return &MDH_PROTO.PulsesRS{}
}
View Source
var PULSERQ_VERSION string

Functions

This section is empty.

Types

type IPulseSenderContainer

type IPulseSenderContainer interface {
	AddPulseSender(string, IPulsesSender) error
	GetPulseSender(string) (IPulsesSender, error)
	IsPulseSenderActivated(string) bool
	lib_gc_container.IContainerStatusListener
	lib_gc_container.IGenericContainerGetter
}
var Container IPulseSenderContainer

type IPulsesSender

type IPulsesSender interface {
	lib_gc_container.IContainerStatusListener
	lib_gc_container.IGenericContents
	SetPulseRQMaker(PulseRQMaker) error
	SetPulseRSProcessor(PulseRSProcessor) error
}

type PulseRQMaker

type PulseRQMaker func(pulses []proto.Message) (proto.Message, error)
var DEFAULT_RQMAKER PulseRQMaker = func(pulses []PROTO.Message) (PROTO.Message, error) {
	a_pulses := make([]*MDH_PROTO.Pulse, len(pulses))
	for z, m := range pulses {
		a_pulses[z] = m.(*MDH_PROTO.Pulse)
	}
	rq := &MDH_PROTO.PulsesRQ{Pulse: a_pulses, Version: &PULSERQ_VERSION}
	return rq, nil
}

Function used by the sender to build the implementation specific pulse rq.

To provide this function is mandatory for each client, because, only each specific client knows the exact type of proto.Message implementation it want to send to pulse.

Parameter of the function: Slice with all of messages which will be encapsulated into a bpulse request.

type PulseRSProcessor

type PulseRSProcessor func(pulseRS proto.Message, rs_writer io.Writer) error
var DEFAULT_RSPROCESSOR PulseRSProcessor = func(pulseRS PROTO.Message, rs_writer io.Writer) error {
	return nil
}

Function used to process the bpulse response. it's optional.

Arguments:

pulseRS : Message returned by bpulse
rs_writer : If provided, it's used to save the unmarshaled responses of bpulses

type PulseSenderContainer

type PulseSenderContainer struct {
	Container lib_gc_container.IGenericContainer
	// contains filtered or unexported fields
}

func (*PulseSenderContainer) AddPulseSender

func (container *PulseSenderContainer) AddPulseSender(name string, sender IPulsesSender) error

func (*PulseSenderContainer) GetGenericContainer

func (container *PulseSenderContainer) GetGenericContainer() lib_gc_container.IGenericContainer

func (*PulseSenderContainer) GetPulseSender

func (container *PulseSenderContainer) GetPulseSender(name string) (IPulsesSender, error)

func (*PulseSenderContainer) IsPulseSenderActivated

func (container *PulseSenderContainer) IsPulseSenderActivated(name string) bool

func (*PulseSenderContainer) Shutdown

func (container *PulseSenderContainer) Shutdown() error

func (*PulseSenderContainer) Start

func (container *PulseSenderContainer) Start() error

func (*PulseSenderContainer) Stop

func (container *PulseSenderContainer) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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