rest

package
v0.0.0-...-c6ba9ae Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

func StartRESTServer

func StartRESTServer(port string)

Types

type MessagesLastMinute

type MessagesLastMinute struct {
	Topic          string `json:"topic"`
	ProducedCount  int64  `json:"produced_count"`
	ConsumedCount  int64  `json:"consumed_count"`
	ProducedPerSec int64  `json:"produced_per_sec"`
	ConsumedPerSec int64  `json:"consumed_per_sec"`
}

MessagesLastMinute holds the count of produced and consumed messages in the last minute and last second

type OffsetHistoryEntry

type OffsetHistoryEntry struct {
	Offset    int64
	Timestamp time.Time
}

OffsetHistoryEntry stores offset and timestamp

type Response

type Response struct {
	Status  string      `json:"status"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

type Server

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

func NewServer

func NewServer(port string) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type TopicRequest

type TopicRequest struct {
	Name              string `json:"name"`
	Partitions        int32  `json:"partitions"`
	ReplicationFactor int16  `json:"replication_factor"`
}

Jump to

Keyboard shortcuts

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