<!-- Code generated by gomarkdoc. DO NOT EDIT -->

# config

```go
import "github.com/Akilan1999/p2p-rendering-computation/config"
```

## Index

- [func GetCurrentPath\(\) \(string, error\)](<#GetCurrentPath>)
- [func GetEnvName\(\) string](<#GetEnvName>)
- [func GetPathP2PRC\(Envname string\) \(string, error\)](<#GetPathP2PRC>)
- [func SetEnvName\(EnvName string\) error](<#SetEnvName>)
- [type Config](<#Config>)
  - [func ConfigInit\(defaultsParameter map\[string\]interface\{\}, CustomConfig interface\{\}, envNameOptional ...string\) \(\*Config, error\)](<#ConfigInit>)
  - [func \(c \*Config\) GetPublicKey\(\) \(string, error\)](<#Config.GetPublicKey>)
  - [func \(c \*Config\) WriteConfig\(\) error](<#Config.WriteConfig>)


<a name="GetCurrentPath"></a>
## func [GetCurrentPath](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L47>)

```go
func GetCurrentPath() (string, error)
```

GetCurrentPath Getting P2PRC Directory from environment variable

<a name="GetEnvName"></a>
## func [GetEnvName](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L80>)

```go
func GetEnvName() string
```



<a name="GetPathP2PRC"></a>
## func [GetPathP2PRC](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L53>)

```go
func GetPathP2PRC(Envname string) (string, error)
```

GetPathP2PRC Getting P2PRC Directory from environment variable

<a name="SetEnvName"></a>
## func [SetEnvName](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L74>)

```go
func SetEnvName(EnvName string) error
```

SetEnvName Sets the environment name This is to ensure that the Path of your project is detected from your environment variable This is useful when extending the use case of P2PRC

<a name="Config"></a>
## type [Config](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L19-L44>)



```go
type Config struct {
    MachineName              string
    IPTable                  string
    DockerContainers         string
    DefaultDockerFile        string
    DockerRunLogs            string
    SpeedTestFile            string
    IPV6Address              string
    PluginPath               string
    TrackContainersPath      string
    ServerPort               string
    ProxyPort                string
    GroupTrackContainersPath string
    FRPServerPort            string
    BehindNAT                string
    IPTableKey               string
    PublicKeyFile            string
    PrivateKeyFile           string
    PemFile                  string
    KeyFile                  string
    BareMetal                bool
    UnsafeMode               bool
    CustomConfig             interface{}
}
```

<a name="ConfigInit"></a>
### func [ConfigInit](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L85>)

```go
func ConfigInit(defaultsParameter map[string]interface{}, CustomConfig interface{}, envNameOptional ...string) (*Config, error)
```

ConfigInit Pass environment name as an optional parameter

<a name="Config.GetPublicKey"></a>
### func \(\*Config\) [GetPublicKey](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L179>)

```go
func (c *Config) GetPublicKey() (string, error)
```

GetPublicKey Gets public key of the current machine based on the path provided on the config file

<a name="Config.WriteConfig"></a>
### func \(\*Config\) [WriteConfig](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L161>)

```go
func (c *Config) WriteConfig() error
```



Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
