register

package
v3.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package register build service and register to consul.

Index

Constants

View Source
const (
	CmdDesc = "Register service to consul"
	CmdName = "service:register"
)

Variables

This section is empty.

Functions

func New

func New() (managers.Command, error)

New create and return instance.

go run main.go service:register \
  --addr=consul.example.com \
  --scheme=https \
  --service-addr=127.0.0.1 \
  --service-port=8080 \
  --service-id=myapp-hash-string \
  --service-name=myapp

Types

type Command

type Command struct {
	Command managers.Command
	Err     error
	Name    string
}

func (*Command) Handle

func (o *Command) Handle(_ managers.Manager, _ managers.Arguments) (err error)

Handle send upload request.

func (*Command) InitField

func (o *Command) InitField() *Command

InitField initialize command fields.

func (*Command) InitOption

func (o *Command) InitOption() *Command

InitOption initialize command option.

Jump to

Keyboard shortcuts

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