instances

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 28 Imported by: 0

README

实例

目录结构:

/opt/cache
/usr/local/goedge/
	edge-admin/
	   configs/
	      api_admin.yaml
	      api_db.yaml
	      server.yaml
	edge-api/
	   configs/api.yaml
	   configs/db.yaml
	api-node/
	   configs/api_node.yaml
	api-user/
	   configs/api_user.yaml
    src/	   
/usr/bin/
  edge-admin -> ...
  edge-api -> ...
  edge-node -> ...
  edge-user -> ...
/usr/local/mysql
  • 其中 -> 表示软链接。
  • src/ 目录下放置zip格式的待安装压缩包

端口

  • Admin:7788
  • API:8001
  • API HTTP:8002
  • User: 7799
  • Server: 8080

数据库

数据库名称为 edges

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	RPCEndpoints     []string `yaml:"rpc.endpoints,flow,omitempty" json:"rpc.endpoints"`
	RPCDisableUpdate bool     `yaml:"rpc.disableUpdate,omitempty" json:"rpc.disableUpdate"`
	NodeId           string   `yaml:"nodeId" json:"nodeId"`
	Secret           string   `yaml:"secret" json:"secret"`
}

func (*APIConfig) AsYAML

func (this *APIConfig) AsYAML() ([]byte, error)

type Instance

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

func NewInstance

func NewInstance(options Options) *Instance

func (*Instance) Clean

func (this *Instance) Clean() error

func (*Instance) SetupAPINode

func (this *Instance) SetupAPINode() error

func (*Instance) SetupAdminNode

func (this *Instance) SetupAdminNode() error

func (*Instance) SetupAll

func (this *Instance) SetupAll() error

func (*Instance) SetupDB

func (this *Instance) SetupDB() error

func (*Instance) SetupNode

func (this *Instance) SetupNode() error

func (*Instance) SetupUserNode

func (this *Instance) SetupUserNode() error

func (*Instance) Startup

func (this *Instance) Startup() error

type Options

type Options struct {
	IsTesting bool
	Verbose   bool
	Cacheable bool

	WorkDir string
	SrcDir  string
	DB      struct {
		Host     string
		Port     int
		Username string
		Password string
		Name     string
	}
	AdminNode struct {
		Port int
	}
	APINode struct {
		HTTPPort     int
		RestHTTPPort int
	}
	Node struct {
		HTTPPort int
	}
	UserNode struct {
		HTTPPort int
	}
}

Jump to

Keyboard shortcuts

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