service

package
v0.0.0-...-3a25d02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir   string
	BindAddr  string
	Bootstrap bool
	NodeName  string
	JoinAddrs []string
	Port      int
}

func (*Config) HTTPAddr

func (c *Config) HTTPAddr() (string, error)

HTTPAddr takes the BindAddr's host and adds the port where the HTTP server is supposed to be hosted in the BindAddr's port's place.

type Service

type Service struct {
	Config Config
	// contains filtered or unexported fields
}

func New

func New(conf Config) (*Service, error)

New creates a Service instance and runs all of the needed setup functions to get the service running.

func (*Service) Close

func (s *Service) Close() error

Close shuts down the service and all of its components.

Jump to

Keyboard shortcuts

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