run

package
v1.5.2-upstream Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

** Copyright [2013-2016] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.

** Copyright [2013-2015] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Version    string
	Branch     string
	Commit     string
	CPUProfile string
	MemProfile string

	Closed chan struct{}

	Server *Server
	// contains filtered or unexported fields
}

Command represents the command executed by "vertice start".

func NewCommand

func NewCommand() *Command

NewCommand return a new instance of Command.

func (*Command) Close

func (cmd *Command) Close() error

Close shuts down the server.

func (*Command) Megd

func (cmd *Command) Megd(c *Config, version string) error

Short form for "Megam daemon - Megd" .We start the vertice daemon.

type Config

type Config struct {
	Meta         *meta.Config          `toml:"meta"`
	Deployd      *deployd.Config       `toml:"deployd"`
	HTTPD        *httpd.Config         `toml:"http"`
	Docker       *docker.Config        `toml:"docker"`
	Metrics      *metricsd.Config      `toml:"metrics"`
	DNS          *dns.Config           `toml:"dns"`
	Events       *eventsd.Config       `toml:"events"`
	Storage      *storage.Config       `toml:"storage"`
	Rancher      *rancher.Config       `toml:"rancher"`
	MarketPlaces *marketplacesd.Config `toml:"marketplaces"`
}

func NewConfig

func NewConfig() *Config

NewConfig returns an instance of Config with reasonable defaults.

func NewDemoConfig

func NewDemoConfig() (*Config, error)

NewDemoConfig returns the config that runs when no config is specified.

func (Config) String

func (c Config) String() string

func (*Config) Validate

func (c *Config) Validate() error

Validate returns an error if the config is invalid.

type Server

type Server struct {
	Services []Service

	// Profiling
	CPUProfile string
	MemProfile string
	// contains filtered or unexported fields
}

Server represents a container for the metadata and storage data and services. It is built using a config and it manages the startup and shutdown of all services in the proper order.

func NewServer

func NewServer(c *Config, version string) (*Server, error)

NewServer returns a new instance of Server built from a config.

func (*Server) Close

func (s *Server) Close() error

Close shuts down the meta and data stores and all services.

func (*Server) Err

func (s *Server) Err() <-chan error

Err returns an error channel that multiplexes all out of band errors received from all services.

func (*Server) Open

func (s *Server) Open() error

Open opens the meta and data store and all services.

type Service

type Service interface {
	Open() error
	Close() error
}

Service represents a service attached to the server.

type Start

type Start struct {
	// contains filtered or unexported fields
}

func (*Start) Flags

func (c *Start) Flags() *gnuflag.FlagSet

func (*Start) Info

func (g *Start) Info() *cmd.Info

func (*Start) ParseConfig

func (c *Start) ParseConfig(path string) (*Config, error)

ParseConfig parses the config at path.

func (*Start) Run

func (c *Start) Run(context *cmd.Context) error

Jump to

Keyboard shortcuts

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