{"id":391,"date":"2019-06-02T15:34:52","date_gmt":"2019-06-02T07:34:52","guid":{"rendered":"https:\/\/www.myway5.com\/?p=391"},"modified":"2023-07-05T21:42:46","modified_gmt":"2023-07-05T13:42:46","slug":"go-hot-upgrade","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/","title":{"rendered":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1"},"content":{"rendered":"<h2>\u4e00\u3001\u6982\u8ff0<\/h2>\n<p>\u5728\u65e5\u5e38\u4e1a\u52a1\u4e2d\uff0c\u670d\u52a1\u4f1a\u7ecf\u5e38\u5347\u7ea7\uff0c\u4f46\u662f\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u4e0d\u5e0c\u671b\u65ad\u5f00\u548c\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u3002\u56e0\u6b64\u5c31\u9700\u8981\u670d\u52a1\u7684\u70ed\u5347\u7ea7\u6280\u672f\u3002<\/p>\n<p>\u5728\u7814\u7a76\u8fd9\u4e2a\u95ee\u9898\u4e4b\u524d\uff0c\u53ef\u4ee5\u5148\u770b\u4e00\u4e0bnginx\u662f\u5982\u4f55\u505a\u5230\u4e0d\u95f4\u65ad\u670d\u52a1\u70ed\u91cd\u542f\u7684\u3002<\/p>\n<ul>\n<li>\u5c06\u65b0\u7684nginx\u53ef\u6267\u884c\u6587\u4ef6\u66ff\u6362\u6389\u65e7\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<li>\u5411<code>master<\/code>\u8fdb\u7a0b\u53d1\u9001<code>USR2<\/code>\u4fe1\u53f7\uff0c<code>master<\/code>\u8fdb\u7a0b\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u540e\u4f1a\u5c06pid\u6587\u4ef6\u547d\u540d\u4e3a<code>.oldbin<\/code>\u540e\u7f00\u3002\u4e4b\u540e\u542f\u52a8\u65b0\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5e76\u542f\u52a8\u65b0\u7684<code>worker<\/code>\u8fdb\u7a0b\u3002\u8fd9\u4e2a\u65f6\u5019\u4f1a\u6709\u4e24\u4e2a<code>master\u8fdb\u7a0b<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u5411\u7b2c\u4e00\u4e2a<code>master<\/code>\u8fdb\u7a0b\u53d1\u9001<code>WINCH<\/code>\u4fe1\u53f7\u3002\u7b2c\u4e00\u4e2amaster\u8fdb\u7a0b\u4f1a\u901a\u77e5\u65e7\u7684<code>worker<\/code>\u8fdb\u7a0b\u4f18\u96c5\uff08\u5904\u7406\u5b8c\u5f53\u524d\u8bf7\u6c42\uff09\u5730\u9000\u51fa\u3002<\/p>\n<\/li>\n<li>\u5982\u679c\u6b64\u65f6\u65b0\u7684\u53ef\u6267\u884c\u6587\u4ef6\u6709\u95ee\u9898\u3002\u53ef\u4ee5\u505a\u4ee5\u4e0b\u63aa\u65bd\uff1a<\/li>\n<li>\u5411\u65e7\u7684<code>master<\/code>\u8fdb\u7a0b\u53d1\u9001<code>HUP<\/code>\u4fe1\u53f7\uff0c\u65e7\u7684<code>master<\/code>\u8fdb\u7a0b\u4f1a\u542f\u52a8\u65b0\u7684<code>worker<\/code>\u8fdb\u7a0b\uff0c\u5e76\u4e14\u4e0d\u4f1a\u91cd\u65b0\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u3002\u7136\u540e\u4f1a\u5411\u65b0\u7684<code>master<\/code>\u8fdb\u7a0b\u53d1\u9001<code>QUIT<\/code>\u4fe1\u53f7\u6765\u8981\u6c42\u5176\u9000\u51fa\u3002<\/li>\n<li>\u53d1\u9001<code>TERM<\/code>\u4fe1\u53f7\u5230\u65b0\u7684master\u8fdb\u7a0b\uff0c\u65b0\u7684master\u8fdb\u7a0b\u548c\u5176\u6d3e\u751f\u7684<code>worker<\/code>\u8fdb\u7a0b\u90fd\u4f1a\u7acb\u523b\u9000\u51fa\u3002\u65e7\u7684<code>master<\/code>\u8fdb\u7a0b\u4f1a\u81ea\u52a8\u542f\u52a8\u65b0\u7684<code>worker<\/code>\u8fdb\u7a0b\u3002<\/li>\n<li>\u5982\u679c\u5347\u7ea7\u6210\u529f\uff0c<code>QUIT<\/code>\u4fe1\u53f7\u4f1a\u53d1\u9001\u7ed9\u65e7\u7684<code>master<\/code>\u8fdb\u7a0b\uff0c\u5e76\u9000\u51fa\u3002<\/li>\n<\/ul>\n<p>\u5b8c\u6574\u7684\u6587\u6863\u53ef\u4ee5\u770b: http:\/\/nginx.org\/en\/docs\/control.html#upgrade<\/p>\n<p>\u5728go\u4e2d\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\u4e5f\u662f\u8fd9\u4e2a\u601d\u8def\u3002<\/p>\n<h2>\u4e8c\u3001\u5177\u4f53\u5b9e\u73b0<\/h2>\n<h3>2.1 \u5b9a\u4e49\u670d\u52a1<\/h3>\n<pre><code class=\"line-numbers\">type Server struct {\nl         net.Listener  \/\/ \u76d1\u542c\u7aef\u53e3\nconns     map[int]net.Conn  \/\/ \u5f53\u524d\u670d\u52a1\u7684\u6240\u6709\u8fde\u63a5\nrw        sync.RWMutex      \/\/ \u8bfb\u5199\u9501\uff0c\u7528\u6765\u4fdd\u8bc1conns\u5728\u5e76\u53d1\u60c5\u51b5\u4e0b\u7684\u6b63\u5e38\u5de5\u4f5c\nidLock    sync.Mutex        \/\/ \u9501\uff0c\u7528\u6765\u4fdd\u8bc1idCursor\u5728\u5e76\u53d1\u60c5\u51b5\u4e0b\u7684\u9012\u589e\u6ca1\u6709\u95ee\u9898\nidCursor  int               \/\/ \u7528\u6765\u6807\u8bb0\u5f53\u524d\u8fde\u63a5\u7684id\nisChild   bool \/\/ \u662f\u5426\u662f\u5b50\u8fdb\u7a0b\nstatus    int  \/\/ \u5f53\u524d\u670d\u52a1\u7684\u72b6\u6001\nrelaxTime int  \/\/ \u5728\u9000\u51fa\u65f6\u5141\u8bb8\u534f\u7a0b\u5904\u7406\u8bf7\u6c42\u7684\u65f6\u95f4\n}\n<\/code><\/pre>\n<h3>2.2 \u5904\u7406\u4fe1\u53f7<\/h3>\n<pre><code class=\"line-numbers\">func (s *Server) handleSignal() {\nsc := make(chan os.Signal)\n\nsignal.Notify(sc, syscall.SIGHUP, syscall.SIGTERM)\n\nfor {\nsig := &lt;-sc\n\nswitch sig {\ncase syscall.SIGHUP:\nlog.Println(\"signal sighup\")\n\/\/ reload\ngo func() {\ns.fork()\n}()\ncase syscall.SIGTERM:\nlog.Println(\"signal sigterm\")\n\/\/ stop\ns.shutdown()\n}\n}\n}\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u53ea\u5904\u7406\u4e86\u4e24\u4e2a\u4fe1\u53f7\uff0c<code>HUP<\/code>\u8868\u793a\u8981\u70ed\u5347\u7ea7\u670d\u52a1\uff0c\u6b64\u65f6\u4f1afork\u4e00\u4e2a\u65b0\u7684\u670d\u52a1\u3002<code>TERM<\/code>\u8868\u793a\u8981\u7ec8\u6b62\u670d\u52a1\u3002<\/p>\n<h3>2.3 \u5982\u4f55fork\u65b0\u7684\u670d\u52a1<\/h3>\n<pre><code class=\"line-numbers\">func (s *Server) fork() (err error) {\n\nlog.Println(\"start forking\")\nserverLock.Lock()\ndefer serverLock.Unlock()\n\nif isForked {\nreturn errors.New(\"Another process already forked. Ignoring this one\")\n}\n\nisForked = true\n\nfiles := make([]*os.File, 1+len(s.conns))\nfiles[0], err = s.l.(*net.TCPListener).File() \/\/ \u5c06\u76d1\u542c\u5e26\u5165\u5230\u5b50\u8fdb\u7a0b\u4e2d\nif err != nil {\nlog.Println(err)\nreturn\n}\n\ni := 1\nfor _, conn := range s.conns {\nfiles[i], err = conn.(*net.TCPConn).File()\n\nif err != nil {\nlog.Println(err)\nreturn\n}\n\ni++\n}\n\nenv := append(os.Environ(), CHILD_PROCESS+\"=1\")\nenv = append(env, fmt.Sprintf(\"%s=%s\", SERVER_CONN, strconv.Itoa(len(s.conns))))\n\npath := os.Args[0] \/\/ \u5f53\u524d\u53ef\u6267\u884c\u7a0b\u5e8f\u7684\u8def\u5f84\nvar args []string\nif len(os.Args) &gt; 1 {\nargs = os.Args[1:]\n}\n\ncmd := exec.Command(path, args...)\ncmd.Stdin = os.Stdin\ncmd.Stdout = os.Stdout\ncmd.Stderr = os.Stderr\ncmd.ExtraFiles = files\ncmd.Env = env\n\nerr = cmd.Start()\nif err != nil {\nlog.Println(err)\nreturn\n}\n\nreturn\n}\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u4f1a\u5c06\u76d1\u542c\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u4ee5\u53ca\u6240\u6709\u8fde\u63a5\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u90fd\u5e26\u5230\u65b0\u7684\u670d\u52a1\u4e2d\u3002\u8fd9\u91cc\u53ea\u9700\u8981\u5728\u65b0\u7684\u670d\u52a1\u4e2d\u91cd\u65b0\u4f7f\u7528\u8fd9\u4e9b\u6587\u4ef6\u63cf\u8ff0\u7b26\u5373\u53ef\u4fdd\u8bc1\u4e0d\u65ad\u5f00\u8fde\u63a5\u3002<\/p>\n<h3>2.4 \u670d\u52a1\u7684\u542f\u52a8\u6d41\u7a0b<\/h3>\n<pre><code class=\"line-numbers\">func (s *Server) Start(addr string) {\nvar err error\n\nlog.Printf(\"pid: %v \\n\", os.Getpid())\n\ns.setState(StateInit)\n\nif s.isChild {\nlog.Println(\"\u8fdb\u5165\u5b50\u8fdb\u7a0b\")\n\/\/ \u901a\u77e5\u7236\u8fdb\u7a0b\u505c\u6b62\nppid := os.Getppid()\n\nerr := syscall.Kill(ppid, syscall.SIGTERM)\n\nif err != nil {\nlog.Fatal(err)\n}\n\n\/\/ \u5b50\u8fdb\u7a0b\uff0c \u91cd\u65b0\u76d1\u542c\u4e4b\u524d\u7684\u8fde\u63a5\nconnN, err := strconv.Atoi(os.Getenv(SERVER_CONN))\nif err != nil {\nlog.Fatal(err)\n}\n\nfor i := 0; i &lt; connN; i++ {\nf := os.NewFile(uintptr(4+i), \"\")\nc, err := net.FileConn(f)\nif err != nil {\nlog.Print(err)\n} else {\nid := s.add(c)\ngo s.handleConn(c, id)\n}\n}\n}\n\ns.l, err = s.getListener(addr)\nif err != nil {\nlog.Fatal(err)\n}\ndefer s.l.Close()\n\nlog.Println(\"listen on \", addr)\n\ngo s.handleSignal()\n\ns.setState(StateRunning)\n\nfor {\nlog.Println(\"start accept\")\nconn, err := s.l.Accept()\nif err != nil {\nlog.Fatal(err)\nreturn\n}\n\nlog.Println(\"accept new conn\")\n\nid := s.add(conn)\ngo s.handleConn(conn, id)\n}\n\n}\n\nfunc (s *Server) getListener(addr string) (l net.Listener, err error) {\nif s.isChild {\nf := os.NewFile(3, \"\")\nl, err = net.FileListener(f)\nreturn\n}\n\nl, err = net.Listen(\"tcp\", addr)\n\nreturn\n}\n<\/code><\/pre>\n<p>\u542f\u52a8\u65f6\uff0c\u4f1a\u5224\u65ad\u662f\u5426\u662ffork\u51fa\u7684\u65b0\u7684\u8fdb\u7a0b\u3002\u5982\u679c\u662f\uff0c\u5219\u7ee7\u627f\u4ece\u7236\u8fdb\u7a0b\u4f20\u9012\u8fc7\u6765\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u5e76\u91cd\u65b0\u76d1\u542c\u6216\u4f5c\u4e3a\u8fde\u63a5\u5904\u7406\u3002<\/p>\n<p>\u5b8c\u6574\u7684\u4ee3\u7801\u53c2\u8003github: https:\/\/github.com\/joyme123\/graceful_restart_server_in_golang_demo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6982\u8ff0 \u5728\u65e5\u5e38\u4e1a\u52a1\u4e2d\uff0c\u670d\u52a1\u4f1a\u7ecf\u5e38\u5347\u7ea7\uff0c\u4f46\u662f\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u4e0d\u5e0c\u671b\u65ad\u5f00\u548c\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u3002\u56e0\u6b64\u5c31\u9700\u8981\u670d\u52a1\u7684\u70ed\u5347\u7ea7\u6280\u672f\u3002 &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[77,79],"class_list":["post-391","post","type-post","status-publish","format-standard","hentry","category-go","tag-go","tag-hot-upgrade"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u6982\u8ff0 \u5728\u65e5\u5e38\u4e1a\u52a1\u4e2d\uff0c\u670d\u52a1\u4f1a\u7ecf\u5e38\u5347\u7ea7\uff0c\u4f46\u662f\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u4e0d\u5e0c\u671b\u65ad\u5f00\u548c\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u3002\u56e0\u6b64\u5c31\u9700\u8981\u670d\u52a1\u7684\u70ed\u5347\u7ea7\u6280\u672f\u3002 &hellip; \u7ee7\u7eed\u9605\u8bfb\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-02T07:34:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T13:42:46+00:00\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1\",\"datePublished\":\"2019-06-02T07:34:52+00:00\",\"dateModified\":\"2023-07-05T13:42:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\"},\"wordCount\":30,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"keywords\":[\"go\",\"hot upgrade\"],\"articleSection\":[\"go\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\",\"name\":\"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"datePublished\":\"2019-06-02T07:34:52+00:00\",\"dateModified\":\"2023-07-05T13:42:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u4e00\u3001\u6982\u8ff0 \u5728\u65e5\u5e38\u4e1a\u52a1\u4e2d\uff0c\u670d\u52a1\u4f1a\u7ecf\u5e38\u5347\u7ea7\uff0c\u4f46\u662f\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u4e0d\u5e0c\u671b\u65ad\u5f00\u548c\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u3002\u56e0\u6b64\u5c31\u9700\u8981\u670d\u52a1\u7684\u70ed\u5347\u7ea7\u6280\u672f\u3002 &hellip; \u7ee7\u7eed\u9605\u8bfb\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1","og_url":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2019-06-02T07:34:52+00:00","article_modified_time":"2023-07-05T13:42:46+00:00","author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1","datePublished":"2019-06-02T07:34:52+00:00","dateModified":"2023-07-05T13:42:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/"},"wordCount":30,"commentCount":0,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"keywords":["go","hot upgrade"],"articleSection":["go"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/","url":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/","name":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"datePublished":"2019-06-02T07:34:52+00:00","dateModified":"2023-07-05T13:42:46+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2019\/06\/02\/go-hot-upgrade\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728go\u4e2d\u4f18\u96c5\u7684\u70ed\u5347\u7ea7\u670d\u52a1"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":5970,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":3,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":1578,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/391\/revisions\/1578"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}