chiprouter

package module
v0.0.0-...-f9a4559 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGRPCPort         = 50051
	DefaultAdminPort        = 50050
	DefaultBeholderGRPCPort = 50053
)

Variables

This section is empty.

Functions

func RegisterSubscriber

func RegisterSubscriber(ctx context.Context, adminURL, name, endpoint string) (string, error)

func UnregisterSubscriber

func UnregisterSubscriber(ctx context.Context, adminURL, id string) error

Types

type HealthResponse

type HealthResponse struct {
}

func Health

func Health(ctx context.Context, adminURL string) (*HealthResponse, error)

type Input

type Input struct {
	Image         string  `toml:"image" comment:"Chip router Docker image"`
	GRPCPort      int     `toml:"grpc_port" comment:"Chip router gRPC host/container port"`
	AdminPort     int     `toml:"admin_port" comment:"Chip router admin HTTP host/container port"`
	ContainerName string  `toml:"container_name" comment:"Docker container name"`
	PullImage     bool    `toml:"pull_image" comment:"Whether to pull Chip router image or not"`
	LogLevel      string  `toml:"log_level" comment:"Chip router log level (trace, debug, info, warn, error)"`
	Out           *Output `toml:"out" comment:"Chip router output"`
}

type Output

type Output struct {
	UseCache         bool   `toml:"use_cache" comment:"Whether to reuse cached output"`
	ContainerName    string `toml:"container_name" comment:"Docker container name"`
	ExternalGRPCURL  string `toml:"grpc_external_url" comment:"Host-reachable gRPC endpoint"`
	InternalGRPCURL  string `toml:"grpc_internal_url" comment:"Docker-network gRPC endpoint"`
	ExternalAdminURL string `toml:"admin_external_url" comment:"Host-reachable admin endpoint"`
	InternalAdminURL string `toml:"admin_internal_url" comment:"Docker-network admin endpoint"`
}

func New

func New(in *Input) (*Output, error)

func NewWithContext

func NewWithContext(ctx context.Context, in *Input) (*Output, error)

Directories

Path Synopsis
cmd
chip-router command

Jump to

Keyboard shortcuts

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