Documentation ¶
Overview ¶
Package fsutils provides utility functions to manage mole related files and directories.
Index ¶
- Constants
- func CreateHomeDir() (string, error)
- func CreatePidFile(id string) (string, error)
- func Dir() (string, error)
- func GetLogFileLocation(id string) (string, error)
- func GetPidFileLocation(id string) (string, error)
- func Pid(id string) (int, error)
- func PidFileLocation(id string) (string, error)
- func RpcAddress(id string) (string, error)
- type InstanceDirInfo
Constants ¶
const ( InstancePidFile = "pid" InstanceLogFile = "mole.log" )
Variables ¶
This section is empty.
Functions ¶
func CreateHomeDir ¶
CreateHomeDir creates then returns the location where all mole related files are persisted, including alias configuration and log files.
func CreatePidFile ¶
CreatePidFile creates a file, inside the directory allocated for instance, witht the instance process id.
func Dir ¶
Dir returns the location where all mole related files are persisted, including alias configuration and log files.
func GetLogFileLocation ¶
GetLogFileLocation returns the file system location of the file where all log messages are saved for an specific detached application instance.
func GetPidFileLocation ¶
GetPidFileLocation returns the file system location of the application instance in the file system.
func PidFileLocation ¶
PidFileLocation returns the location of the pid file associated with a mole instance.
Only detached instances keep a pid file so, if an alias is given to this function, a path to a non-existent file will be returned.
func RpcAddress ¶
RpcAddress returns the network address of the rpc server for a given application instance id or alias.
Types ¶
type InstanceDirInfo ¶
func CreateInstanceDir ¶
func CreateInstanceDir(appId string) (*InstanceDirInfo, error)
CreateInstanceDir creates and then returns the location where all files related to a specific mole instance are persisted. Along with the directory this function also created a pid file where the instance process id is stored.
func InstanceDir ¶
func InstanceDir(id string) (*InstanceDirInfo, error)
InstanceDir returns the location where all files related to a specific mole instance are persisted.