Skip to content

Commit

Permalink
Adding file handler (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajadeepan D Ramesh authored and tianxiaoliang committed Nov 19, 2018
1 parent 4bc93b3 commit 720d998
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sources/file-source/file_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ func retrieveItems(prefix string, subItems yaml.MapSlice) map[string]interface{}

return result
}

//Convert2configMap converts the yaml file file name as key and the content as value
func Convert2configMap(p string, content []byte) (map[string]interface{}, error) {
configMap := make(map[string]interface{})
configMap[p] = content
return configMap, nil
}

0 comments on commit 720d998

Please sign in to comment.