accesslog

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerService

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

func NewConsumer

func NewConsumer(brokers []string, topic string, consumerGroup string) (*ConsumerService, error)

func (*ConsumerService) Start

func (kcs *ConsumerService) Start(process func(accessLog *Log)) error

func (*ConsumerService) Stop

func (kcs *ConsumerService) Stop()

type Log

type Log struct {
	KeyID     *string   `json:"key_id,omitempty"` // ID string of key
	Path      string    `json:"path"`
	Status    int       `json:"status"`
	Timestamp time.Time `json:"ts"`
}

type ProducerClient

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

func NewProducer

func NewProducer(brokers []string, topic string) (*ProducerClient, error)

func (*ProducerClient) ProduceLog

func (kpc *ProducerClient) ProduceLog(l *Log) error

func (*ProducerClient) Stop

func (kpc *ProducerClient) Stop()

Jump to

Keyboard shortcuts

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