// SetProtocol sets the protocol on the readiness check.
18313
func (rc *ReadinessCheck) SetProtocol(proto string) *ReadinessCheck {
	rc.Protocol = proto
	return rc
}
749662
func (s *Transport) SetProtocol(v string) *Transport {
	s.Protocol = &v
	return s
}
258410
func (s *OriginationRoute) SetProtocol(v string) *OriginationRoute {
	s.Protocol = &v
	return s
}
1031981
func validateProtocol(s string, allowed []string) (string, bool) {
	canons := map[string]string{
		"http":     "http",
		"https":    "https",
		"dns":      "dns",
		"http:":    "http",
		"https:":   "https",
		"dns:":     "dns",
		"http://":  "http",
		"https://": "https",
		"dns://":   "dns",
	}

	canon, ok := canons[s]
	if ok {
		return canon, stringsContains(allowed, canon)
	}
	return canon, false
}
463396
func (f *Forward) SetProxy(p *Proxy) {
	f.proxies = append(f.proxies, p)
	p.start(f.hcInterval)
}
285343
func NewWithProtocol(proto Protocol) (*IPTables, error) {
	path, err := exec.LookPath(getIptablesCommand(proto))
	if err != nil {
		return nil, err
	}
	vstring, err := getIptablesVersionString(path)
	v1, v2, v3, mode, err := extractIptablesVersion(vstring)

	checkPresent, waitPresent, randomFullyPresent := getIptablesCommandSupport(v1, v2, v3)

	ipt := IPTables{
		path:           path,
		proto:          proto,
		hasCheck:       checkPresent,
		hasWait:        waitPresent,
		hasRandomFully: randomFullyPresent,
		v1:             v1,
		v2:             v2,
		v3:             v3,
		mode:           mode,
	}
	return &ipt, nil
}
1233811
func (s *SetSourceRequest) SetProtocol(v string) *SetSourceRequest {
	s.Protocol = &v
	return s
}
148245
func (s *PortInfo) SetProtocol(v string) *PortInfo {
	s.Protocol = &v
	return s
}
27370
func SetPPROF(config PPROF) {
	runtime.SetBlockProfileRate(config.BlockProfileRate)
	runtime.SetMutexProfileFraction(config.MutexProfileFraction)
}
1041306
func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput {
	s.Protocol = &v
	return s
}
924527
func SetProxy(proxy func(*http.Request) (*url.URL, error)) error {
	return std.SetProxy(proxy)
}
1030306
func (s *Listener) SetProtocol(v string) *Listener {
	s.Protocol = &v
	return s
}
346173
func (sub *Subscription) ensureProtocol() error {
	if sub.resp == nil {
		p, err := sub.database.pool.pull(forcedPull)
		if err != nil {
			return err
		}
		sub.resp = p
	}
	return nil
}
1231424
func withProtocol(protocol, framework string, spec labels.Func, gen chain) chain {
	return func(records ...string) {
		protocol = spec(protocol)
		if protocol != protocolNone {
			for i := range records {
				records[i] += "._" + protocol + "." + framework
			}
		} else {
			records = append(records, records...)
			for i, j := 0, len(records)/2; j < len(records); {
				records[i] += "._tcp." + framework
				records[j] += "._udp." + framework
				i++
				j++
			}
		}
		gen(records...)
	}
}
1014468
func (s *RadiusSettings) SetAuthenticationProtocol(v string) *RadiusSettings {
	s.AuthenticationProtocol = &v
	return s
}
845845
func (s *UpdateFlowOutputInput) SetProtocol(v string) *UpdateFlowOutputInput {
	s.Protocol = &v
	return s
}
94201
func setupProtocol(msg *transport.Message) codec.NewCodec {
	service := getHeader("Micro-Service", msg.Header)
	method := getHeader("Micro-Method", msg.Header)
	endpoint := getHeader("Micro-Endpoint", msg.Header)
	protocol := getHeader("Micro-Protocol", msg.Header)
	target := getHeader("Micro-Target", msg.Header)

	// if the protocol exists (mucp) do nothing
	if len(protocol) > 0 {
		return nil
	}

	// if no service/method/endpoint then it's the old protocol
	if len(service) == 0 && len(method) == 0 && len(endpoint) == 0 {
		return defaultCodecs[msg.Header["Content-Type"]]
	}

	// old target method specified
	if len(target) > 0 {
		return defaultCodecs[msg.Header["Content-Type"]]
	}

	// no method then set to endpoint
	if len(method) == 0 {
		msg.Header["Micro-Method"] = endpoint
	}

	// no endpoint then set to method
	if len(endpoint) == 0 {
		msg.Header["Micro-Endpoint"] = method
	}

	return nil
}