app

package
v0.0.0-...-4f1ce62 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

The app package provides the application level feature for oryx, for example, the server object and some stream control service.

Index

Constants

This section is empty.

Variables

View Source
var SIGUSR1 = syscall.SIGUSR1
View Source
var SIGUSR2 = syscall.SIGUSR2

Functions

This section is empty.

Types

type Heartbeat

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

func NewHeartbeat

func NewHeartbeat(ctx core.Context) *Heartbeat

func (*Heartbeat) Initialize

func (v *Heartbeat) Initialize(w core.WorkerContainer) (err error)

type IfaceType

type IfaceType uint8
const (
	IfaceInternet IfaceType = iota
	IfaceIntranet
	IfaceUnknown
)

func (IfaceType) String

func (v IfaceType) String() string

type NetworkIface

type NetworkIface struct {
	// interface name.
	Ifname string
	// the ip address of interface.
	Ip string
	// the mac address of interface.
	Mac string
	// whether the interface ip is public.
	Internet IfaceType
}

func (*NetworkIface) String

func (v *NetworkIface) String() string

type Server

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

func NewServer

func NewServer(ctx core.Context) *Server

func (*Server) Close

func (v *Server) Close()

notify server to stop and wait for cleanup.

func (*Server) GFork

func (v *Server) GFork(name string, f func(core.WorkerContainer))

func (*Server) Initialize

func (v *Server) Initialize() (err error)

func (*Server) OnReloadGlobal

func (v *Server) OnReloadGlobal(scope int, cc, pc *core.Config) (err error)

interface ReloadHandler

func (*Server) OnReloadVhost

func (v *Server) OnReloadVhost(vhost string, scope int, cc, pc *core.Config) (err error)

func (*Server) ParseConfig

func (v *Server) ParseConfig(conf string) (err error)

func (*Server) PrepareLogger

func (v *Server) PrepareLogger() (err error)

func (*Server) QC

func (v *Server) QC() <-chan bool

interface WorkContainer

func (*Server) Quit

func (v *Server) Quit() error

func (*Server) Run

func (v *Server) Run() (err error)

type ServerState

type ServerState int

the state of server, state graph:

Init => Normal(Ready => Running)
Init/Normal => Closed
const (
	StateInit ServerState = 1 << iota
	StateReady
	StateRunning
	StateClosed
)

type Summary

type Summary struct {
	Ok   bool  `json:"ok"`
	Now  int64 `json:"now_ms"`
	Self struct {
		Version string `json:"version"`
		Pid     int64  `json:"pid"`
		Ppid    int64  `json:"ppid"`
	} `json:"self"`
}

func NewSummary

func NewSummary() *Summary

Jump to

Keyboard shortcuts

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