startup

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 7 Imported by: 0

README

ccStartup

ccStartup is used to provide the current node topology to some central endpoint either through HTTP or NATS.

Configuration

The configuration file for the startup contains the targets where the topology should be sent to.

{
    "http": {
        "url": "http://localhost:8080/my_startup_endpoint",
        "auth_token": "my-secret-login-token"
    },
    "nats": {
        "url": "nats://localhost:4222",
        "nkey_file:": "/path/to/nkey/file/if/any",
        "subject": "my_startup_subject"
    }
}
  • http.url: Target URL for the HTTP POST request containing the node topology as JSON
  • http.auth_token: JSON Web token or :
  • nats.url: NATS server URL
  • nats.subject: NATS subject where to publish the topology as JSON
  • nats.nkey_file: Path to NKey file for authentification

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CCStartup

func CCStartup(config json.RawMessage) error

Types

type CCStartupConfig

type CCStartupConfig struct {
	SendTopology bool `json:"send_topology,omitempty"`
	HttpEndpoint struct {
		URL       string `json:"url"`
		AuthToken string `json:"auth_token"`
	} `json:"http"`
	NatsEndpoint struct {
		URL      string `json:"url"`
		Subject  string `json:"subject"`
		NkeyFile string `json:"nkey_file"`
	} `json:"nats"`
}

Jump to

Keyboard shortcuts

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