github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/dashboard/config.go (about)

     1  
     2  //<developer>
     3  //    <name>linapex 曹一峰</name>
     4  //    <email>linapex@163.com</email>
     5  //    <wx>superexc</wx>
     6  //    <qqgroup>128148617</qqgroup>
     7  //    <url>https://jsq.ink</url>
     8  //    <role>pku engineer</role>
     9  //    <date>2019-03-16 19:16:37</date>
    10  //</624450087170347008>
    11  
    12  
    13  package dashboard
    14  
    15  import "time"
    16  
    17  //DefaultConfig contains default settings for the dashboard.
    18  var DefaultConfig = Config{
    19  	Host:    "localhost",
    20  	Port:    8080,
    21  	Refresh: 5 * time.Second,
    22  }
    23  
    24  //配置包含仪表板的配置参数。
    25  type Config struct {
    26  //主机是启动仪表板服务器的主机接口。如果这样
    27  //field is empty, no dashboard will be started.
    28  	Host string `toml:",omitempty"`
    29  
    30  //端口是启动仪表板服务器的TCP端口号。这个
    31  //默认的零值是/有效的,将随机选择端口号(有用
    32  //for ephemeral nodes).
    33  	Port int `toml:",omitempty"`
    34  
    35  //refresh是数据更新的刷新率,通常会收集图表条目。
    36  	Refresh time.Duration `toml:",omitempty"`
    37  }
    38