Documentation
¶
Index ¶
- func Batcher_step_example()
- func JobGrouper(s, i interface{}, idx int) (interface{}, error)
- func JobMapper(in interface{}) (interface{}, error)
- func Mapper_step_example()
- func Publisher_pipeline_example()
- func Raw_pipeline_example()
- type MessageSchema
- type PubsubMessage
- type ValidationData
- type ValidationJob
- type ValidationJobGroups
- type ValidationJobList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Batcher_step_example ¶ added in v1.2.0
func Batcher_step_example()
func JobGrouper ¶ added in v1.2.0
JobGrouper groups jobs
func JobMapper ¶ added in v1.2.0
func JobMapper(in interface{}) (interface{}, error)
JobMapper transforms a input into a pubsub validation job
func Mapper_step_example ¶
func Mapper_step_example()
Mapper_step_example exhibits the operation of a recently instantiated SubscriberPipeline with an additional mapper step attached, which modifies the data that goes through the pipeline.
The pipeline outputs the contents of a channel, which is channeling *Pubsub.Message messages, in this case. The message then goes through a Mapper step, which is suported by the package, but provided by the client.
A Mapper is particularly useful for consuming the raw *Pubsub.Message contents and transforming them into a more practical custom type (such as myCustomType).
func Publisher_pipeline_example ¶ added in v1.1.1
func Publisher_pipeline_example()
Publisher_pipeline_example shows the operation of a recently instantiated Generics compatible PubsubClient publisher. It accepts any message schema, requiring only that it's type implements ToByteser interface. The message schema, along with a wrapped Pubsub Topic (created with a NewTopicWrapper), must be passed to the PubsubClient builder (MustNewPubSubClient).
func Raw_pipeline_example ¶
func Raw_pipeline_example()
Raw_pipeline_example shows the raw operation of a recently instantiated SubscriberPipeline with no additional steps attached.
The SubscriberPipeline builder (MustNewSubscriberPipeline) requires a Pubsub Subscriber (or something that equally implements it's Receive functionality). The pipeline then outputs the contents of a channel, which in it's turn, channels *Pubsub.Message messages in this case.
Types ¶
type MessageSchema ¶ added in v1.1.1
type MessageSchema struct {
Attr string
}
MessageSchema represents the message schema that will be published.
func (MessageSchema) ToBytes ¶ added in v1.1.1
func (ms MessageSchema) ToBytes() ([]byte, error)
ToBytes marshals itself using it's instance data.
type PubsubMessage ¶ added in v1.2.0
PubsubMessage encapsulates pubsub messages
type ValidationData ¶ added in v1.2.0
type ValidationJob ¶ added in v1.2.0
ValidationJob represents a domain ValidationMessage at Pubsub.
func NewPubsubValidationJob ¶ added in v1.2.0
func NewPubsubValidationJob(pm PubsubMessage) (ValidationJob, error)
NewPubsubValidationJob creates a new ValidationJob instance.
type ValidationJobGroups ¶ added in v1.2.0
type ValidationJobGroups map[string]ValidationJobList
ValidationJobGroups groups validation jobs by a key
type ValidationJobList ¶ added in v1.2.0
type ValidationJobList []ValidationJob
ValidationJobList is a list of validation jobs