tcp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessFn

type ProcessFn func(message []byte)

type Provider

type Provider struct{}

func (*Provider) CreateListener

func (p *Provider) CreateListener(ctx context.Context, config *v1alpha1.NotificationSource, client client.Client, eventChan chan events.SecretRotationEvent, logger logr.Logger) (schema.Listener, error)

type TCPSocket

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

TCPSocket represents a TCP socket listener. It utilizes a stop channel to manage its lifecycle.

func NewTCPSocketListener

func NewTCPSocketListener(ctx context.Context, config *v1alpha1.TCPSocketConfig, client client.Client, eventChan chan events.SecretRotationEvent, logger logr.Logger) (*TCPSocket, error)

NewTCPSocketListener initializes a new TCP socket in a way other components can consume

func (*TCPSocket) SetProcessFn

func (h *TCPSocket) SetProcessFn(p ProcessFn)

func (*TCPSocket) Start

func (h *TCPSocket) Start() error

Start initiates the TCPSocket service, making it ready to accept incoming connections.

func (*TCPSocket) Stop

func (h *TCPSocket) Stop() error

Stop stops the TCP socket by closing the stop channel.

Jump to

Keyboard shortcuts

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