Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Go Cloud まとめ

jewel12
October 23, 2018
58

Go Cloud まとめ

jewel12

October 23, 2018
Tweet

Transcript

  1. (P$MPVE w 8SJUFPODF SVOPOBOZDMPVE w $MPVE1MBUGPSNʹґଘ͠ͳ͍ɺϙʔλϒϧͳΞϓϦέʔγϣϯ Λॻͨ͘ΊͷϓϩδΣΫτ w ґଘ෦෼͸গͳͯ͘͠ϚϧνΫϥ΢υΛ࣮ݱ͍ͨ͠ w

    (P͸Ϋϥ΢υ؀ڥͰ࢖ΘΕΔύλʔϯ͕ଟ͍ w $MPVE*OGSBTUSVDUVSF5PPMT ,T *TUJP %PDLFS  w ༷ʑͳαʔϏε͕Ϋϥ΢υ؀ڥͰ(PΛ࢖͍ͬͯΔ -ZGU $BQJUBM 0OF /FUqJY 'SPN1PSUBCMF$MPVE1SPHSBNNJOHXJUI(P$MPVE
  2. όέπಡΈॻ͖  w νϡʔτϦΞϧίʔυΛಡ΋͏ … b, err := setupBucket(context.Background(), *cloud,

    *bucketName) w, err := b.NewWriter(ctx, file, nil) _, err = w.Write(data) w (PPHMF$MPVE42-΍"NB[PO3%4Λ࢖͏৔߹΋ EBUBCBTFTRMͷΠϯλʔϑΣʔεΛ࣮૷ͨ͠υϥΠό Λ࢖༻͢Δ͜ͱʹͳΔ
  3. HPDMPVETBNQMFT HVFTUCPPLXJSF@HFOHP func setupAWS(ctx context.Context, flags *cliFlags) (*application, func(), error)

    { wire.Build( awscloud.AWS, applicationSet, awsBucket, awsMOTDVar, awsSQLParams, ) return nil, nil, nil } w 3%4઀ଓઃఆͳͲΛऴΘΒͤͯBQQMJDBUJPOTUSVDUͷ ॳظԽΛ͢Δίʔυ͕୹͘ॻ͚ͨ
  4. 8JSF w ΋͏ͪΐ͍ৄ͘͠͸!CVEPVHVNJ͞ΜͷHPDMPVE ͱ8JSFΛར༻ͨ͠%*Λࢀর w ೔લʹࣅͨࢿྉ͕ग़͍ͯΔͷʹࠓ೔ؾ෇͍ͨʜʜ w 1SPWJEFSͱ*OKFDUPS w 1SPWJEFSґଘੑΛఆٛͨ͠ίϯϙʔωϯτ

    w *OKFDUPS1SPWJEFSΛґଘॱ൪Ͱฒ΂ͯίʔυੜ੒ w 1SPWJEFS΋*OKFDUPS΋GVODUJPOͰදݱ͞Εɺγάωνϟ ͰґଘੑͷఆٛͱղܾΛ͍ͯͯ͠໘ന͍