nginx

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Update([]registryclient.ServiceInstance, []rules.Rule) error
}

Client for NGINX

func NewClient

func NewClient(url string) Client

NewClient return new NGINX client

type Config

type Config struct {
	Service Service
	Client  Client
}

Config options

type Manager

type Manager interface {
	// Update NGINX with the provided configuration
	Update([]registryclient.ServiceInstance, []rules.Rule) error
}

Manager of updates to NGINX

func NewManager

func NewManager(conf Config) Manager

NewManager creates new a instance

type MockClient

type MockClient struct {
	UpdateError error
	UpdateCount int
}

MockClient mocks NGINX Client interface

func (*MockClient) Update

Update mocks interface

type MockManager

type MockManager struct {
	UpdateError error
	UpdateCount int
}

MockManager mocks interface

func (*MockManager) Update

Update mocks interface

type MockService

type MockService struct {
	StartError error
	StartCount int

	ReloadError error
	ReloadCount int

	RunningError error
	RunningBool  bool
	RunningCount int
}

MockService mocks NGINX Service interface

func (*MockService) Reload

func (m *MockService) Reload() error

Reload mocks interface

func (*MockService) Running

func (m *MockService) Running() (bool, error)

Running mocks interface

func (*MockService) Start

func (m *MockService) Start() error

Start mocks interface

type Service

type Service interface {
	Start() error
	Reload() error
	Running() (bool, error)
}

Service provides management operations for the NGINX service

func NewService

func NewService() Service

NewService creates new instance

Jump to

Keyboard shortcuts

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