proxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PubTopic = "m/%s/c/%s/messages/registry/server"
	SubTopic = "m/%s/c/%s/messages/registry/proplet"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPProxyConfig

type HTTPProxyConfig struct {
	ChunkSize    int
	Authenticate bool
	Token        string
	Username     string
	Password     string
	RegistryURL  string
}

func (*HTTPProxyConfig) FetchFromReg

func (c *HTTPProxyConfig) FetchFromReg(ctx context.Context, containerPath string, chunkSize int) ([]proplet.ChunkPayload, error)

type ProxyService

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

func NewService

func NewService(ctx context.Context, pubsub pkgmqtt.PubSub, domainID, channelID string, httpCfg HTTPProxyConfig, logger *slog.Logger) (*ProxyService, error)

func (*ProxyService) ContainerChan

func (s *ProxyService) ContainerChan() chan string

func (*ProxyService) StreamHTTP

func (s *ProxyService) StreamHTTP(ctx context.Context) error

func (*ProxyService) StreamMQTT

func (s *ProxyService) StreamMQTT(ctx context.Context) error

Jump to

Keyboard shortcuts

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