mirror of
https://github.com/status-im/consul.git
synced 2025-02-10 20:56:46 +00:00
* execute copyright headers after performing deep-copy generation. * fix copyright install * Apply suggestions from code review Co-authored-by: Semir Patel <semir.patel@hashicorp.com> * Apply suggestions from code review Co-authored-by: Semir Patel <semir.patel@hashicorp.com> * rename steps to match codegen naming * remove copywrite install category --------- Co-authored-by: Semir Patel <semir.patel@hashicorp.com>
46 lines
1.3 KiB
Go
46 lines
1.3 KiB
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package proxytracker
|
|
|
|
import (
|
|
"github.com/hashicorp/consul/acl"
|
|
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1"
|
|
)
|
|
|
|
// ProxyState is an implementation of the ProxySnapshot interface for pbmesh.ProxyState.
|
|
// It is a simple wrapper around pbmesh.ProxyState so that it can be used
|
|
// by the ProxyWatcher interface in XDS processing. This struct is necessary
|
|
// because pbmesh.ProxyState is a proto definition and there were complications
|
|
// adding these functions directly to that proto definition.
|
|
type ProxyState struct {
|
|
*pbmesh.ProxyState
|
|
}
|
|
|
|
// TODO(proxystate): need to modify ProxyState to carry a type/kind (connect proxy, mesh gateway, etc.)
|
|
// for sidecar proxies, all Allow* functions
|
|
// should return false, but for different gateways we'd need to add it to IR.
|
|
|
|
func (p *ProxyState) AllowEmptyListeners() bool {
|
|
return false
|
|
}
|
|
|
|
func (p *ProxyState) AllowEmptyRoutes() bool {
|
|
return false
|
|
}
|
|
|
|
func (p *ProxyState) AllowEmptyClusters() bool {
|
|
return false
|
|
}
|
|
|
|
func (p *ProxyState) Authorize(authz acl.Authorizer) error {
|
|
// TODO(proxystate): we'll need to implement this once identity policy is implemented
|
|
|
|
// Authed OK!
|
|
return nil
|
|
}
|
|
|
|
func (p *ProxyState) LoggerName() string {
|
|
return ""
|
|
}
|