admin

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(opts Options) (*Client, error)

func (*Client) CreateTopic

func (c *Client) CreateTopic(ctx context.Context, req CreateTopicReq) error

CreateTopic will create a topic in cluster. Note: it will not return an error when topic already exists.

func (*Client) ListTopics

func (c *Client) ListTopics(ctx context.Context) ([]string, error)

ListTopics returns list of topics, available in cluster. Actually, this method will read all partitions, not topics. Be careful.

type CreateTopicReq

type CreateTopicReq struct {
	Name              string
	Partitions        uint
	ReplicationFactor uint
	Schema            ISchema
}

type ISchema

type ISchema interface {
	KvPairs() map[string]string
}

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

func WithBootstrapServers

func WithBootstrapServers(opt []string) OptOptionsSetter

func WithLogger

func WithLogger(opt ILogger) OptOptionsSetter

func WithTlsConfig

func WithTlsConfig(opt *tls.Config) OptOptionsSetter

type Options

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

func NewOptions

func NewOptions(
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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