polaris

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package polaris implements onexmesh registry.Registrar and registry.Discovery backed by the Polaris service mesh (github.com/polarismesh/polaris-go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscovery

func NewDiscovery(opts Options) (registry.Discovery, error)

NewDiscovery creates a Polaris Discovery.

func NewRegistrar

func NewRegistrar(opts Options) (registry.Registrar, error)

NewRegistrar creates a Polaris Registrar.

Types

type Options

type Options struct {
	// Addr is the Polaris server address, e.g. "127.0.0.1:8091".
	Addr string
	// Namespace is the Polaris namespace to register/discover in.
	Namespace string
	// Token is the service access token, if required by the server.
	Token string
	// TTL is the heartbeat TTL in seconds; meaningful only when Heartbeat is true.
	TTL int
	// Heartbeat enables SDK-managed auto heartbeat (requires TTL).
	Heartbeat bool
	// Protocol is the service protocol, e.g. "grpc" or "http".
	Protocol string
	// Host is the local instance host used for registration.
	Host string
	// Port is the local instance port used for registration.
	Port int
	// Version is the service version.
	Version string
	// Metadata carries arbitrary instance metadata.
	Metadata map[string]string
}

Options configures the Polaris backend.

Jump to

Keyboard shortcuts

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