config

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2018 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// goapptraceによって作成されたディレクトリとファイルの、デフォルトのパーミッション
	DefaultDirPerm  = 0700
	DefaultFilePerm = 0600

	ConfigFilePerm = 0666
)
View Source
const (
	DefaultLogServerAddr = "localhost:8600"
	DefaultApiServerAddr = "localhost:8700"
)
View Source
const (
	TimestampFormat = "15:04:05.999999999"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServerConfig

type ApiServerConfig struct {
	ServerID ServerID `json:"server-id"`
	Version  int      `json:"version"`
	// server address like "http://x.x.x.x:xxxx".
	Addr string `json:"address"`
}

configuration for the REST API server.

type BuildProcess

type BuildProcess struct {
	Args []string
}

func (*BuildProcess) Run

func (bp *BuildProcess) Run() (*exec.Cmd, error)

Run run a command for build the app This method wait for exit build process.

type Config

type Config struct {
	Targets Targets
	Servers Servers
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(dir string) *Config

func (*Config) Load

func (c *Config) Load() error

func (Config) LogsDir

func (c Config) LogsDir() string

func (*Config) Save

func (c *Config) Save() error

func (*Config) SaveIfWant

func (c *Config) SaveIfWant() error

func (*Config) WantSave

func (c *Config) WantSave()

type ExecProcess

type ExecProcess struct {
	Args []string
}

func (*ExecProcess) Start

func (ep *ExecProcess) Start(env []string) (*exec.Cmd, error)

Start execute a command but does not wait for exit

type LogServerConfig

type LogServerConfig struct {
	ServerID ServerID `json:"server-id"`
	Version  int      `json:"version"`
	// server address like "tcp://x.x.x.x:xxxx".
	Addr string `json:"address"`
}

configuration for Log server.

type Process

type Process struct {
	PID        int
	Socket     string
	UnixSocket string
}

type ServerID

type ServerID int64

type Servers

type Servers struct {
	LogServer map[ServerID]*LogServerConfig
	ApiServer map[ServerID]*ApiServerConfig
}

func NewServers

func NewServers() *Servers

type Target

type Target struct {
	Name  TargetName
	Files []string
	Build BuildProcess
	Run   ExecProcess
	Trace map[string]*Trace
}

func (*Target) WalkTraces

func (t *Target) WalkTraces(files []string, fn func(fname string, trace *Trace, created bool) error) error

type TargetName

type TargetName string

type Targets

type Targets struct {
	Targets map[TargetName]*Target
}

func NewTargets

func NewTargets() *Targets

func (*Targets) Add

func (tt *Targets) Add(t *Target) error

func (*Targets) Delete

func (tt *Targets) Delete(name TargetName) error

func (*Targets) Get

func (tt *Targets) Get(name TargetName) (*Target, error)

func (*Targets) Names

func (tt *Targets) Names() []string

func (*Targets) Walk

func (tt *Targets) Walk(names []string, fn func(*Target) error) error

type Trace

type Trace struct {
	HasTracingCode bool
	IsTracing      bool
}

Jump to

Keyboard shortcuts

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