Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrDownloadMongod ¶
func GetOrDownloadMongod(urlStr string, cachePath string, logger *memongolog.Logger) (string, error)
GetOrDownloadMongod returns the path to the mongod binary from the tarball at the given URL. If the URL has not yet been downloaded, it's downloaded and saved the the cache. If it has been downloaded, the existing mongod path is returned.
Types ¶
type DownloadSpec ¶
type DownloadSpec struct { // Version is what version of MongoDB to download Version string // Platform is "osx" or "linux" Platform string // SSLBuildNeeded is "ssl" if we need to download the SSL build for macOS // (needed for <4.2) SSLBuildNeeded bool // Arch is always "x86_64" Arch string // OSName is one of: // - ubuntu1804 // - ubuntu1604 // - ubuntu1404 // - debian92 // - debian81 // - suse12 // - rhel70 // - rhel62 // - amazon // - amazon2 // - "" for other linux or for MacOS OSName string }
DownloadSpec specifies what copy of MongoDB to download
func MakeDownloadSpec ¶
func MakeDownloadSpec(version string) (*DownloadSpec, error)
MakeDownloadSpec returns a DownloadSpec for the current operating system
func (*DownloadSpec) GetDownloadURL ¶
func (spec *DownloadSpec) GetDownloadURL() string
GetDownloadURL returns the download URL to download the binary from the MongoDB website
type UnsupportedMongoVersionError ¶
type UnsupportedMongoVersionError struct {
// contains filtered or unexported fields
}
UnsupportedMongoVersionError is used to indicate the memongo doesn't know how to download the given version of MongoDB
func (*UnsupportedMongoVersionError) Error ¶
func (err *UnsupportedMongoVersionError) Error() string
type UnsupportedSystemError ¶
type UnsupportedSystemError struct {
// contains filtered or unexported fields
}
UnsupportedSystemError is used to indicate that memongo does not support automatic selection of the right MongoDB binary for your system
func (*UnsupportedSystemError) Error ¶
func (err *UnsupportedSystemError) Error() string