tcp

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestInitialBytesLength  = 4
	ResponseInitialBytesLength = 8
	MaxStringLength            = 255
	MaxPartitionCount          = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IggyTcpClient

type IggyTcpClient struct {
	MessageCompression iggcon.IggyMessageCompression
	// contains filtered or unexported fields
}

func NewIggyTcpClient

func NewIggyTcpClient(options ...Option) (*IggyTcpClient, error)

func (*IggyTcpClient) ChangePassword

func (tms *IggyTcpClient) ChangePassword(userID iggcon.Identifier, currentPassword string, newPassword string) error

func (*IggyTcpClient) CreateConsumerGroup

func (tms *IggyTcpClient) CreateConsumerGroup(streamId iggcon.Identifier, topicId iggcon.Identifier, name string) (*iggcon.ConsumerGroupDetails, error)

func (*IggyTcpClient) CreatePartitions

func (tms *IggyTcpClient) CreatePartitions(streamId iggcon.Identifier, topicId iggcon.Identifier, partitionsCount uint32) error

func (*IggyTcpClient) CreatePersonalAccessToken

func (tms *IggyTcpClient) CreatePersonalAccessToken(name string, expiry uint32) (*iggcon.RawPersonalAccessToken, error)

func (*IggyTcpClient) CreateStream

func (tms *IggyTcpClient) CreateStream(name string) (*iggcon.StreamDetails, error)

func (*IggyTcpClient) CreateTopic

func (tms *IggyTcpClient) CreateTopic(
	streamId iggcon.Identifier,
	name string,
	partitionsCount uint32,
	compressionAlgorithm iggcon.CompressionAlgorithm,
	messageExpiry iggcon.Duration,
	maxTopicSize uint64,
	replicationFactor *uint8,
) (*iggcon.TopicDetails, error)

func (*IggyTcpClient) CreateUser

func (tms *IggyTcpClient) CreateUser(username string, password string, status iggcon.UserStatus, permissions *iggcon.Permissions) (*iggcon.UserInfoDetails, error)

func (*IggyTcpClient) DeleteConsumerGroup

func (tms *IggyTcpClient) DeleteConsumerGroup(streamId iggcon.Identifier, topicId iggcon.Identifier, groupId iggcon.Identifier) error

func (*IggyTcpClient) DeleteConsumerOffset added in v0.6.0

func (tms *IggyTcpClient) DeleteConsumerOffset(consumer iggcon.Consumer, streamId iggcon.Identifier, topicId iggcon.Identifier, partitionId *uint32) error

func (*IggyTcpClient) DeletePartitions

func (tms *IggyTcpClient) DeletePartitions(streamId iggcon.Identifier, topicId iggcon.Identifier, partitionsCount uint32) error

func (*IggyTcpClient) DeletePersonalAccessToken

func (tms *IggyTcpClient) DeletePersonalAccessToken(name string) error

func (*IggyTcpClient) DeleteStream

func (tms *IggyTcpClient) DeleteStream(id iggcon.Identifier) error

func (*IggyTcpClient) DeleteTopic

func (tms *IggyTcpClient) DeleteTopic(streamId, topicId iggcon.Identifier) error

func (*IggyTcpClient) DeleteUser

func (tms *IggyTcpClient) DeleteUser(identifier iggcon.Identifier) error

func (*IggyTcpClient) GetClient

func (tms *IggyTcpClient) GetClient(clientId uint32) (*iggcon.ClientInfoDetails, error)

func (*IggyTcpClient) GetClients

func (tms *IggyTcpClient) GetClients() ([]iggcon.ClientInfo, error)

func (*IggyTcpClient) GetConsumerGroup

func (tms *IggyTcpClient) GetConsumerGroup(streamId, topicId, groupId iggcon.Identifier) (*iggcon.ConsumerGroupDetails, error)

func (*IggyTcpClient) GetConsumerGroups

func (tms *IggyTcpClient) GetConsumerGroups(streamId, topicId iggcon.Identifier) ([]iggcon.ConsumerGroup, error)

func (*IggyTcpClient) GetConsumerOffset

func (tms *IggyTcpClient) GetConsumerOffset(consumer iggcon.Consumer, streamId iggcon.Identifier, topicId iggcon.Identifier, partitionId *uint32) (*iggcon.ConsumerOffsetInfo, error)

func (*IggyTcpClient) GetPersonalAccessTokens

func (tms *IggyTcpClient) GetPersonalAccessTokens() ([]iggcon.PersonalAccessTokenInfo, error)

func (*IggyTcpClient) GetStats

func (tms *IggyTcpClient) GetStats() (*iggcon.Stats, error)

func (*IggyTcpClient) GetStream

func (tms *IggyTcpClient) GetStream(streamId iggcon.Identifier) (*iggcon.StreamDetails, error)

func (*IggyTcpClient) GetStreams

func (tms *IggyTcpClient) GetStreams() ([]iggcon.Stream, error)

func (*IggyTcpClient) GetTopic

func (tms *IggyTcpClient) GetTopic(streamId iggcon.Identifier, topicId iggcon.Identifier) (*iggcon.TopicDetails, error)

func (*IggyTcpClient) GetTopics

func (tms *IggyTcpClient) GetTopics(streamId iggcon.Identifier) ([]iggcon.Topic, error)

func (*IggyTcpClient) GetUser

func (tms *IggyTcpClient) GetUser(identifier iggcon.Identifier) (*iggcon.UserInfoDetails, error)

func (*IggyTcpClient) GetUsers

func (tms *IggyTcpClient) GetUsers() ([]iggcon.UserInfo, error)

func (*IggyTcpClient) JoinConsumerGroup

func (tms *IggyTcpClient) JoinConsumerGroup(streamId iggcon.Identifier, topicId iggcon.Identifier, groupId iggcon.Identifier) error

func (*IggyTcpClient) LeaveConsumerGroup

func (tms *IggyTcpClient) LeaveConsumerGroup(streamId iggcon.Identifier, topicId iggcon.Identifier, groupId iggcon.Identifier) error

func (*IggyTcpClient) LoginUser

func (tms *IggyTcpClient) LoginUser(username string, password string) (*iggcon.IdentityInfo, error)

func (*IggyTcpClient) LoginWithPersonalAccessToken

func (tms *IggyTcpClient) LoginWithPersonalAccessToken(token string) (*iggcon.IdentityInfo, error)

func (*IggyTcpClient) LogoutUser

func (tms *IggyTcpClient) LogoutUser() error

func (*IggyTcpClient) Ping

func (tms *IggyTcpClient) Ping() error

func (*IggyTcpClient) PollMessages

func (tms *IggyTcpClient) PollMessages(
	streamId iggcon.Identifier,
	topicId iggcon.Identifier,
	consumer iggcon.Consumer,
	strategy iggcon.PollingStrategy,
	count uint32,
	autoCommit bool,
	partitionId *uint32,
) (*iggcon.PolledMessage, error)

func (*IggyTcpClient) SendMessages

func (tms *IggyTcpClient) SendMessages(
	streamId iggcon.Identifier,
	topicId iggcon.Identifier,
	partitioning iggcon.Partitioning,
	messages []iggcon.IggyMessage,
) error

func (*IggyTcpClient) StoreConsumerOffset

func (tms *IggyTcpClient) StoreConsumerOffset(consumer iggcon.Consumer, streamId iggcon.Identifier, topicId iggcon.Identifier, offset uint64, partitionId *uint32) error

func (*IggyTcpClient) UpdatePermissions

func (tms *IggyTcpClient) UpdatePermissions(userID iggcon.Identifier, permissions *iggcon.Permissions) error

func (*IggyTcpClient) UpdateStream

func (tms *IggyTcpClient) UpdateStream(streamId iggcon.Identifier, name string) error

func (*IggyTcpClient) UpdateTopic

func (tms *IggyTcpClient) UpdateTopic(
	streamId iggcon.Identifier,
	topicId iggcon.Identifier,
	name string,
	compressionAlgorithm iggcon.CompressionAlgorithm,
	messageExpiry iggcon.Duration,
	maxTopicSize uint64,
	replicationFactor *uint8,
) error

func (*IggyTcpClient) UpdateUser

func (tms *IggyTcpClient) UpdateUser(userID iggcon.Identifier, username *string, status *iggcon.UserStatus) error

type Option

type Option func(config *Options)

func WithContext

func WithContext(ctx context.Context) Option

WithContext sets context

func WithServerAddress

func WithServerAddress(address string) Option

WithServerAddress Sets the server address for the TCP client.

type Options

type Options struct {
	Ctx               context.Context
	ServerAddress     string
	HeartbeatInterval time.Duration
}

func GetDefaultOptions

func GetDefaultOptions() Options

Jump to

Keyboard shortcuts

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