servicelog

package
v0.0.0-...-4dfe32f Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package servicelog contains an implementation of Producer interface that can be used to produce (that is send) messages to Service Log.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Producer

type Producer struct {
	Configuration              conf.ServiceLogConfiguration
	OCMClient                  ocmclient.OCMClient
	AccessToken                string
	TokenRefreshmentCounter    int
	TokenRefreshmentStartDelay time.Duration
	TokenRefreshmentDelay      time.Duration
	TokenRefreshmentThreshold  time.Duration
}

Producer is an implementation of Producer interface for Service Log

func New

func New(config *conf.ServiceLogConfiguration, ocmClient ocmclient.OCMClient) (*Producer, error)

New constructs a new instance of Producer implementation

func (*Producer) Close

func (producer *Producer) Close() error

Close closes Producer (in case of Service Log implementation, it does not do anything)

func (*Producer) ProduceMessage

func (producer *Producer) ProduceMessage(msg types.ProducerMessage) (partitionID int32, offset int64, err error)

ProduceMessage sends the given message to Service Log

Jump to

Keyboard shortcuts

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