You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ã´ã£ã´å 輩ããGoè¨èªã§çºè¡ããã¯ã¨ãªã確èªããããã£ã¦è¨ã£ã¦ã¦ã ãMySQL使ã£ã¦ãããªãGeneral Logãåãã°ããã®ã§ã¯ï¼ãã¨è¿ãããã ãã©ãã ãã£ã¨æ±ç¨çãªæ¹æ³ã¯ãªããã®ãã¨èãã¦ã¿ã¾ããã Golangã® database/sql ã¯ã©ããªDBã§ã対å¿ã§ããããããã©ã¤ããèªç±ã«å ¥ãæ¿ãããã¨ãã§ãã¾ãã ãã©ã¤ãã¯åã«database/sql/driverã«ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãæºããã¦ããä½ããªã®ã§ã ã¦ã¼ã¶ãèªç±ã«ä½ããã¨ãã§ããããinterfaceãçµç±ãã¦ç´æ¥å¼ã³åºããã¨ãå¯è½ã§ãã ãã®ä»çµã使ã£ã¦ãå¥ã®ãã©ã¤ãã«ãã®ã¾ã¾æ¸¡ããããã·ãä½ãã°ããã°ãåããã®ã§ã¯ï¼ã¨ãããã¨ã§ãã£ã¦ã¿ã¾ããã go-sql-proxy 使ãæ¹ ã¾ãæåã«go-sql-proxyããã©ã¤ãã¨ãã¦ç»é²ãã¾ãã hooks := &proxy.Hooks{ // Hook fun
åä¸ãã¹ãç¨ã®ãªãã¼ã¹ãããã·ãå®è£ ãã net/http/httputilã§ãHTTPç¨ã®Reverse Proxyãå®è£ ããããã®ã©ã¤ãã©ãªãæä¾ããã¦ããã ä¸è¨ã®ã³ã¼ãã§ãhttp://127.0.0.1:3000 ãã http://127.0.0.1:9292 ã«HTTPãªã¯ã¨ã¹ããå§è²ããReverse Proxyãåä½ããã httputil.NewSingleHostReverseProxyã¯httputil.ReverseProxyã®ã¤ã³ã¹ã¿ã³ã¹ãè¿ãã ãã®ã¤ã³ã¹ã¿ã³ã¹ã¯http.Serveräºæã® (.ServeHTTPã¡ã½ããã«å¼å¿ã§ãã) ãªãã¸ã§ã¯ãã§ããããã http.Serverãå©ç¨ãã¦HTTPãµã¼ããåä½ãããããã // main.go package main import( "net/http" "net/http/httputil" "net
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}