cmd

package
v0.0.0-...-c7b9dc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright Istio Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

func FormatIptablesCommands

func FormatIptablesCommands(commands [][]string) []string

func GetCommand

func GetCommand() *cobra.Command

func HandleDNSUDP

func HandleDNSUDP(
	ops Ops, iptables *builder.IptablesBuilderImpl, ext dep.Dependencies,
	cmd, agentDNSListenerPort, dnsUpstreamTargetChain, proxyUID, proxyGID string, dnsServersV4 []string)

HandleDNSUDP is a helper function to tackle with DNS UDP specific operations. This helps the creation logic of DNS UDP rules in sync with the deletion.

func HandleDNSUDPv6

func HandleDNSUDPv6(
	ops Ops, iptables *builder.IptablesBuilderImpl, ext dep.Dependencies,
	cmd, agentDNSListenerPort, dnsUpstreamTargetChain, proxyUID, proxyGID string, dnsServersV6 []string)

HandleDNSUDPv6 is a IPv6 helper function to tackle with DNS UDP specific operations. This helps the creation logic of DNS UDP rules in sync with the deletion.

func SplitV4V6

func SplitV4V6(ips []string) (ipv4 []string, ipv6 []string)

Types

type IptablesConfigurator

type IptablesConfigurator struct {
	// contains filtered or unexported fields
}

func NewIptablesConfigurator

func NewIptablesConfigurator(cfg *config.Config, ext dep.Dependencies) *IptablesConfigurator

type NetworkRange

type NetworkRange struct {
	IsWildcard    bool
	IPNets        []*net.IPNet
	HasLoopBackIP bool
}

type Ops

type Ops int
const (
	// AppendOps performs append operations of rules
	AppendOps Ops = iota
	// DeleteOps performs delete operations of rules
	DeleteOps
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL