backbone

package
v3.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenServer

func ListenServer(c Server) error

Types

type Config

type Config struct {
	RegisterPath string
	RegisterInfo types.ServerInfo
	CoreAPI      apimachinery.ClientSetInterface
	Server       Server
}

type Engine

func New

func New(c *Config, disc ServiceDiscoverInterface) (*Engine, error)

func NewBackbone

func NewBackbone(ctx context.Context, zkAddr string, procName string, confPath string, procHandler cc.ProcHandlerFunc, c *Config) (*Engine, error)

func (*Engine) Ping

func (e *Engine) Ping() error

type Server

type Server struct {
	ListenAddr string
	ListenPort uint
	Handler    http.Handler
	TLS        TLSConfig
}

type ServiceDiscoverInterface

type ServiceDiscoverInterface interface {
	// Ping to check if this service discovery service is health.
	Ping() error

	// stop the service discover service
	Stop() error

	// register local server info, it can only be called for once.
	Register(path string, c types.ServerInfo) error
}

func NewServcieDiscovery

func NewServcieDiscovery(zkAddr string) (ServiceDiscoverInterface, error)

type TLSConfig

type TLSConfig struct {
	// Server should be accessed without verifying the TLS certificate. For testing only.
	InsecureSkipVerify bool
	// Server requires TLS client certificate authentication
	CertFile string
	// Server requires TLS client certificate authentication
	KeyFile string
	// Trusted root certificates for server
	CAFile string
	// the password to decrypt the certificate
	Password string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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