admin

package
v0.0.0-...-2a61a3c Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

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
}

Client concrete representation of Interface

func NewAdmin

func NewAdmin(brokers []string, apikey string) (*Client, error)

NewAdmin create a new instance of admin, must call close when done

func (*Client) Close

func (ac *Client) Close() error

Close the admin client

func (*Client) MaybeCreateTopic

func (ac *Client) MaybeCreateTopic(topicName string, partitions int) error

MaybeCreateTopic creates a topic with the specified name if it doesn't exist. If it does exist already, this function does not do anything. `partitions` is hard-coded to 1 (when this function is called from main()) in this sample app as the Lite plan currently supports only having one partition.

type Interface

type Interface interface {
	MaybeCreateTopic(topicName string, partitions int)
	Close() error
}

Interface the admin interface we provide to callers

Jump to

Keyboard shortcuts

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