Commit f6a04ea9 authored by YAMAMOTO Takashi's avatar YAMAMOTO Takashi

Add a few comments in bootstrap.go

parent d140911b
...@@ -45,6 +45,8 @@ var validBootstrapTypes = map[string]bool{ ...@@ -45,6 +45,8 @@ var validBootstrapTypes = map[string]bool{
bootstrapTypeFull: true, bootstrapTypeFull: true,
} }
// fetchBootstrapData copies the bootstrap data (certs, keys, passwords)
// from etcd to inidividual files specified by cfg.Runtime.
func fetchBootstrapData(cfg *config.Control) error { func fetchBootstrapData(cfg *config.Control) error {
if valid, err := checkBootstrapArgs(cfg, map[string]bool{ if valid, err := checkBootstrapArgs(cfg, map[string]bool{
bootstrapTypeFull: true, bootstrapTypeFull: true,
...@@ -95,6 +97,8 @@ func fetchBootstrapData(cfg *config.Control) error { ...@@ -95,6 +97,8 @@ func fetchBootstrapData(cfg *config.Control) error {
return writeRuntimeBootstrapData(cfg.Runtime, serverRuntime) return writeRuntimeBootstrapData(cfg.Runtime, serverRuntime)
} }
// storeBootstrapData copies the bootstrap data in the opposite direction to
// fetchBootstrapData.
func storeBootstrapData(cfg *config.Control) error { func storeBootstrapData(cfg *config.Control) error {
if valid, err := checkBootstrapArgs(cfg, map[string]bool{ if valid, err := checkBootstrapArgs(cfg, map[string]bool{
bootstrapTypeFull: true, bootstrapTypeFull: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment