Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultConfigSyncPeriod = 10 * time.Second UpstreamServerVar = "__PILLAR__UPSTREAM__SERVERS__" UpstreamClusterDNSVar = "__PILLAR__CLUSTER__DNS__" LocalListenIPsVar = "__PILLAR__LOCAL__DNS__" LocalDNSServerVar = "__PILLAR__DNS__SERVER__" DefaultKubednsCMPath = "/etc/kube-dns" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheApp ¶
type CacheApp struct {
// contains filtered or unexported fields
}
CacheApp contains all the config required to run node-cache.
func NewCacheApp ¶
func NewCacheApp(params *ConfigParams) (*CacheApp, error)
NewCacheApp returns a new instance of CacheApp by applying the specified config params.
func (*CacheApp) Init ¶
func (c *CacheApp) Init()
Init initializes the parameters and networking setup necessary to run node-cache
func (*CacheApp) RunApp ¶
func (c *CacheApp) RunApp()
RunApp invokes the background checks and runs coreDNS as a cache
func (*CacheApp) TeardownNetworking ¶
TeardownNetworking removes all custom iptables rules and network interface added by node-cache
type ConfigParams ¶
type ConfigParams struct { LocalIPStr string // comma separated listen ips for the local cache agent LocalIPs []net.IP // parsed ip addresses for the local cache agent to listen for dns requests LocalPort string // port to listen for dns requests MetricsListenAddress string // address to serve metrics on SetupInterface bool // Indicates whether to setup network interface InterfaceName string // Name of the interface to be created Interval time.Duration // specifies how often to run iptables rules check Pidfile string // Path to the coredns server pidfile BaseCoreFile string // Path to the template config file for node-cache CoreFile string // Path to config file used by node-cache KubednsCMPath string // Directory where kube-dns configmap will be mounted UpstreamSvcName string // Name of the service whose clusterIP is the upstream for node-cache for cluster domain HealthPort string // port for the healthcheck SetupIptables bool SkipTeardown bool // Indicates whether the iptables rules and interface should be torn down }
ConfigParams lists the configuration options that can be provided to node-cache
Click to show internal directories.
Click to hide internal directories.