{"modulePath":"github.com/openstack/stackube","version":"v0.0.0-20171118154006-8d69865d6e6c","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\n## Constants\n\n```go\nconst (\n\tTableNAT = \"nat\"\n\n\tChainPrerouting   = \"PREROUTING\"\n\tChainSKPrerouting = \"STACKUBE-PREROUTING\"\n)\n```\n\n```go\nconst (\n\tDestination = \"-d \"\n\tSource      = \"-s \"\n\tDPort       = \"--dport \"\n\tProtocol    = \"-p \"\n\tJump        = \"-j \"\n\tToDest      = \"--to-destination \"\n)\n```\n\n## Functions\n\n```go\nfunc NewIptables(exec utilexec.Interface) iptablesInterface\n```\n\n## Types\n\n```go\ntype FakeIPTables struct {\n\tsync.Mutex\n\n\tNSLines map[string][]byte\n\t// contains filtered or unexported fields\n}\n```\nFakeIPTables have noop implementation of fake iptables function.\n\n```go\nfunc NewFake() *FakeIPTables\n```\nNewFake return new FakeIPTables.\n\n```go\nfunc (f *FakeIPTables) GetRules(chainName, namespace string) (rules []Rule)\n```\nGetRules returns a list of rules for the given chain. The chain name must match exactly. The matching is pretty dumb, don't rely on it for anything but testing.\n\n```go\ntype Iptables struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Proxier struct {\n\t// contains filtered or unexported fields\n}\n```\nProxier is an iptables based proxy for connections between a localhost:port and services that provide the actual backends in each network.\n\n```go\nfunc NewProxier(kubeConfig, openstackConfig string) (*Proxier, error)\n```\nNewProxier creates a new Proxier.\n\n```go\nfunc (p *Proxier) RegisterInformers()\n```\nRegisterInformers registers informers which informer on namespaces，services and endpoints change.\n\n```go\nfunc (p *Proxier) StartEndpointInformer(stopCh \u003c-chan struct{}) error\n```\nStartEndpointInformer starts endpoint informer.\n\n```go\nfunc (p *Proxier) StartInformerFactory(stopCh \u003c-chan struct{}) error\n```\nStartInformerFactory starts informer factory.\n\n```go\nfunc (p *Proxier) StartNamespaceInformer(stopCh \u003c-chan struct{}) error\n```\nStartNamespaceInformer starts namespace informer.\n\n```go\nfunc (p *Proxier) StartServiceInformer(stopCh \u003c-chan struct{}) error\n```\nStartServiceInformer starts service informer.\n\n```go\nfunc (p *Proxier) SyncLoop() error\n```\nSyncLoop runs periodic work.  This is expected to run as a goroutine or as the main loop of the app.  It does not return.\n\n```go\ntype Rule map[string]string\n```\nRule represents chain's rule.\n\n","path":"github.com/openstack/stackube/pkg/proxy","name":"proxy","synopsis":"","isRedistributable":true}
