Documentation ¶
Index ¶
- Constants
- Variables
- func ContextSetAccessKeyVerified(ctx context.Context, info *AccessKeyVerified) context.Context
- func GetKafkaVaultPath(region, cloudletName, org string) string
- func GetMemProfile() string
- func LoadPrivPEM(key []byte) (ed25519.PrivateKey, error)
- func LoadPubPEM(key []byte) (ed25519.PublicKey, error)
- func StartCpuProfile() string
- func StopCpuProfile() string
- type AccessKeyClient
- func (s *AccessKeyClient) AddAccessKeySig(ctx context.Context) context.Context
- func (s *AccessKeyClient) ConnectController(ctx context.Context) (*grpc.ClientConn, error)
- func (s *AccessKeyClient) InitFlags()
- func (s *AccessKeyClient) IsEnabled() bool
- func (s *AccessKeyClient) StreamAddAccessKey(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func (s *AccessKeyClient) UnaryAddAccessKey(ctx context.Context, method string, req, resp interface{}, cc *grpc.ClientConn, ...) error
- type AccessKeyCommitFunc
- type AccessKeyGrpcServer
- type AccessKeyServer
- func (s *AccessKeyServer) SetRequireTlsAccessKey(require bool)
- func (s *AccessKeyServer) StreamRequireAccessKey(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (s *AccessKeyServer) StreamTlsAccessKey(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (s *AccessKeyServer) UnaryRequireAccessKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (s *AccessKeyServer) UnaryTlsAccessKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (s *AccessKeyServer) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer, ...) error
- func (s *AccessKeyServer) VerifyAccessKeySig(ctx context.Context, method string) (*AccessKeyVerified, error)
- type AccessKeyVerified
- type AccessKeyVerifyOnly
- type AggrResult
- type AggrVal
- type BasicUpgradeHandler
- type CertId
- type CloudletCache
- type CloudletInPoolFunc
- type CloudletLookup
- type CloudletPoolCache
- type CloudletPoolLookup
- type DebugFunc
- type DebugNode
- func (s *DebugNode) AddDebugFunc(cmd string, f DebugFunc)
- func (s *DebugNode) DebugRequest(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_RunDebugServer) error
- func (s *DebugNode) Init(mgr *NodeMgr)
- func (s *DebugNode) RecvDebugReply(ctx context.Context, reply *edgeproto.DebugReply)
- func (s *DebugNode) RecvDebugRequest(ctx context.Context, req *edgeproto.DebugRequest)
- func (s *DebugNode) RegisterClient(client *notify.Client)
- func (s *DebugNode) RegisterServer(server *notify.ServerMgr)
- func (s *DebugNode) RunDebug(ctx context.Context, req *edgeproto.DebugRequest) string
- type EventData
- type EventDataOld
- type EventMatch
- type EventSearch
- type EventTag
- type EventTerms
- type KafkaCreds
- type KeyPair
- type KeyType
- type MatchCA
- type NodeMgr
- func (s *NodeMgr) CommonNamePrefix() string
- func (s *NodeMgr) CommonNames() []string
- func (s *NodeMgr) Event(ctx context.Context, name, org string, keyTags map[string]string, err error, ...)
- func (s *NodeMgr) EventAtTime(ctx context.Context, name, org, typ string, keyTags map[string]string, ...)
- func (s *NodeMgr) EventTerms(ctx context.Context, search *EventSearch) (*EventTerms, error)
- func (s *NodeMgr) FindEvents(ctx context.Context, search *EventSearch) ([]EventData, error)
- func (s *NodeMgr) Finish()
- func (s *NodeMgr) GetInternalTlsCAFile() string
- func (s *NodeMgr) GetInternalTlsCertFile() string
- func (s *NodeMgr) GetInternalTlsKeyFile() string
- func (s *NodeMgr) GetPublicClientTlsConfig(ctx context.Context) (*tls.Config, error)
- func (s *NodeMgr) Init(nodeType, tlsClientIssuer string, ops ...NodeOp) (context.Context, opentracing.Span, error)
- func (s *NodeMgr) InitFlags()
- func (s *NodeMgr) Name() string
- func (s *NodeMgr) RegisterClient(client *notify.Client)
- func (s *NodeMgr) RegisterServer(server *notify.ServerMgr)
- func (s *NodeMgr) SetInternalTlsCAFile(file string)
- func (s *NodeMgr) SetInternalTlsCertFile(file string)
- func (s *NodeMgr) SetInternalTlsKeyFile(file string)
- func (s *NodeMgr) ShowEvents(ctx context.Context, search *EventSearch) ([]EventData, error)
- func (s *NodeMgr) ShowSpans(ctx context.Context, search *SpanSearch) ([]dbmodel.Span, error)
- func (s *NodeMgr) ShowSpansCondensed(ctx context.Context, search *SpanSearch) ([]SpanOutCondensed, error)
- func (s *NodeMgr) SpanTerms(ctx context.Context, search *SpanSearch) (*SpanTerms, error)
- func (s *NodeMgr) TimedEvent(ctx context.Context, name, org, typ string, keyTags map[string]string, ...)
- func (s *NodeMgr) UpdateMyNode(ctx context.Context)
- func (s *NodeMgr) UpdateNodeProps(ctx context.Context, props map[string]string)
- type NodeOp
- func WithCachesLinkToKVStore() NodeOp
- func WithCloudletKey(key *edgeproto.CloudletKey) NodeOp
- func WithCloudletLookup(cloudletLookup CloudletLookup) NodeOp
- func WithCloudletPoolLookup(cloudletPoolLookup CloudletPoolLookup) NodeOp
- func WithContainerVersion(ver string) NodeOp
- func WithESUrls(urls string) NodeOp
- func WithHARole(haRole process.HARole) NodeOp
- func WithName(name string) NodeOp
- func WithNoUpdateMyNode() NodeOp
- func WithParentSpan(parentSpan string) NodeOp
- func WithRegion(region string) NodeOp
- func WithTestTransport(tr http.RoundTripper) NodeOp
- func WithVaultConfig(vaultConfig *vault.Config) NodeOp
- type NodeOptions
- type NotifyState
- type PubCert
- type PublicCertManager
- func (s *PublicCertManager) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (s *PublicCertManager) GetServerTlsConfig(ctx context.Context) (*tls.Config, error)
- func (s *PublicCertManager) StartRefresh()
- func (s *PublicCertManager) StopRefresh()
- func (s *PublicCertManager) TLSMode() mextls.TLSMode
- type RegionNodeCache
- type RunDebugServer
- type SearchHits
- type SearchResp
- type SearchResult
- type SearchVal
- type SpanLogOut
- type SpanMatch
- type SpanOutCondensed
- type SpanSearch
- type SpanTerms
- type TlsOp
- type TlsOptions
- type VaultCert
Constants ¶
const ( PrimaryKey = 0 BackupKey = 1 )
const ( EnableDebugLevels = "enable-debug-levels" DisableDebugLevels = "disable-debug-levels" ShowDebugLevels = "show-debug-levels" RefreshInternalCerts = "refresh-internal-certs" StartCpuProfileCmd = "start-cpu-profile" StopCpuProfileCmd = "stop-cpu-profile" GetMemProfileCmd = "get-mem-profile" DisableSampleLog = "disable-sample-logging" EnableSampleLog = "enable-sample-logging" DumpCloudletPools = "dump-cloudlet-pools" DumpStackTrace = "dump-stack-trace" DumpNotifyConns = "dump-notify-state" )
const ( CertIssuerGlobal = "pki-global" CertIssuerRegional = "pki-regional" CertIssuerRegionalCloudlet = "pki-regional-cloudlet" NoTlsClientIssuer = "" )
Three intermediate certificates are used to issue certificates to services. The global intermediate certificate is used for global services. The regional intermediate certificate is used for regional services like the Controller. The cloudlet intermediate certificate is used for regional services that run in partner environments, where we have less control over security.
const NoRegion = ""
Variables ¶
var ( NoOrg = "" EventType = "event" AuditType = "audit" DefaultTimeDuration = 48 * time.Hour MaxQueuedEvents = 1000 )
var BadAuthDelay = 3 * time.Second
var DefaultDebugTimeout = 10 * time.Second
var GetAccessDataMethod = "/edgeproto.CloudletAccessApi/GetAccessData"
var NodeTypeAutoProv = "autoprov"
var NodeTypeCCRM = "ccrm"
var NodeTypeCRM = "crm"
var NodeTypeClusterSvc = "cluster-svc"
var NodeTypeController = "controller"
var NodeTypeDME = "dme"
var NodeTypeEdgeTurn = "edgeturn"
var NodeTypeFRM = "frm"
var NodeTypeMC = "mc"
var NodeTypeNotifyRoot = "notifyroot"
var UpgradeAccessKeyMethod = "/edgeproto.CloudletAccessKeyApi/UpgradeAccessKey"
var VerifyDelay time.Duration = time.Second
var VerifyRetry = 30
Functions ¶
func ContextSetAccessKeyVerified ¶
func ContextSetAccessKeyVerified(ctx context.Context, info *AccessKeyVerified) context.Context
func GetKafkaVaultPath ¶
func GetMemProfile ¶
func GetMemProfile() string
func LoadPrivPEM ¶
func LoadPrivPEM(key []byte) (ed25519.PrivateKey, error)
func StartCpuProfile ¶
func StartCpuProfile() string
func StopCpuProfile ¶
func StopCpuProfile() string
Types ¶
type AccessKeyClient ¶
type AccessKeyClient struct { AccessKeyFile string AccessApiAddr string TestSkipTlsVerify bool // contains filtered or unexported fields }
AccessKeyClient maintains information needed on the client.
func (*AccessKeyClient) AddAccessKeySig ¶
func (s *AccessKeyClient) AddAccessKeySig(ctx context.Context) context.Context
Add an access key signature to the grpc metadata
func (*AccessKeyClient) ConnectController ¶
func (s *AccessKeyClient) ConnectController(ctx context.Context) (*grpc.ClientConn, error)
Common helper function to connect to Controller
func (*AccessKeyClient) InitFlags ¶
func (s *AccessKeyClient) InitFlags()
func (*AccessKeyClient) IsEnabled ¶
func (s *AccessKeyClient) IsEnabled() bool
func (*AccessKeyClient) StreamAddAccessKey ¶
func (s *AccessKeyClient) StreamAddAccessKey(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
Grpc stream interceptor to add access key
func (*AccessKeyClient) UnaryAddAccessKey ¶
func (s *AccessKeyClient) UnaryAddAccessKey(ctx context.Context, method string, req, resp interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
Grpc unary interceptor to add access key
type AccessKeyCommitFunc ¶
type AccessKeyGrpcServer ¶
type AccessKeyGrpcServer struct { AccessKeyServer *AccessKeyServer // contains filtered or unexported fields }
AccessKeyGrcpServer starts up a grpc listener for the access API endpoint. This is used both by the Controller and various unit test code, and keeps the interceptor setup consistent while avoiding duplicate code.
func (*AccessKeyGrpcServer) ApiAddr ¶
func (s *AccessKeyGrpcServer) ApiAddr() string
func (*AccessKeyGrpcServer) Start ¶
func (s *AccessKeyGrpcServer) Start(addr string, keyServer *AccessKeyServer, tlsConfig *tls.Config, registerHandlers func(server *grpc.Server)) error
func (*AccessKeyGrpcServer) Stop ¶
func (s *AccessKeyGrpcServer) Stop()
type AccessKeyServer ¶
type AccessKeyServer struct {
// contains filtered or unexported fields
}
AccessKeyServer maintains state to validate clients.
func NewAccessKeyServer ¶
func NewAccessKeyServer(cloudletCache *edgeproto.CloudletCache, vaultAddr string) *AccessKeyServer
func (*AccessKeyServer) SetRequireTlsAccessKey ¶
func (s *AccessKeyServer) SetRequireTlsAccessKey(require bool)
func (*AccessKeyServer) StreamRequireAccessKey ¶
func (s *AccessKeyServer) StreamRequireAccessKey(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
Grpc stream interceptor to require and verify access key
func (*AccessKeyServer) StreamTlsAccessKey ¶
func (s *AccessKeyServer) StreamTlsAccessKey(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
Grpc stream interceptor to require and verify access key based on client cert
func (*AccessKeyServer) UnaryRequireAccessKey ¶
func (s *AccessKeyServer) UnaryRequireAccessKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Grpc unary interceptor to require and verify access key
func (*AccessKeyServer) UnaryTlsAccessKey ¶
func (s *AccessKeyServer) UnaryTlsAccessKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Grpc unary interceptor to require and verify access key based on client cert
func (*AccessKeyServer) UpgradeAccessKey ¶
func (s *AccessKeyServer) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer, commitKeyFunc func(ctx context.Context, key *edgeproto.CloudletKey, pubPEM string, role process.HARole) error) error
func (*AccessKeyServer) VerifyAccessKeySig ¶
func (s *AccessKeyServer) VerifyAccessKeySig(ctx context.Context, method string) (*AccessKeyVerified, error)
Verify an access key signature in the grpc metadata
type AccessKeyVerified ¶
type AccessKeyVerified struct { Key edgeproto.CloudletKey UpgradeRequired bool }
func ContextGetAccessKeyVerified ¶
func ContextGetAccessKeyVerified(ctx context.Context) *AccessKeyVerified
type AccessKeyVerifyOnly ¶
type AccessKeyVerifyOnly bool
const ( AccessKeyVerify AccessKeyVerifyOnly = true AccessKeyUpgrade = false )
type AggrResult ¶
type AggrResult struct {
Buckets []AggrVal `json:"buckets"`
}
These aggr structs are just for parsing the aggr response from ElasticSearch
type BasicUpgradeHandler ¶
type BasicUpgradeHandler struct {
KeyServer *AccessKeyServer
}
Basic edgeproto.CloudletAccessKeyApiServer handler for unit tests only.
func (*BasicUpgradeHandler) UpgradeAccessKey ¶
func (s *BasicUpgradeHandler) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer) error
type CloudletCache ¶
type CloudletCache struct {
// contains filtered or unexported fields
}
func (*CloudletCache) GetCloudlet ¶
func (s *CloudletCache) GetCloudlet(region string, key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool
func (*CloudletCache) GetCloudletCache ¶
func (s *CloudletCache) GetCloudletCache(region string) *edgeproto.CloudletCache
func (*CloudletCache) Init ¶
func (s *CloudletCache) Init()
type CloudletInPoolFunc ¶
type CloudletInPoolFunc func(region, key edgeproto.CloudletKey) bool
type CloudletLookup ¶
type CloudletLookup interface { GetCloudlet(region string, key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool GetCloudletCache(region string) *edgeproto.CloudletCache }
CloudletLookup interface used by events to get the kafka cluster endpoint for a cloudlet in order to send events out
type CloudletPoolCache ¶
type CloudletPoolCache struct { PoolsByCloudlet edgeproto.CloudletPoolByCloudletKey // contains filtered or unexported fields }
func (*CloudletPoolCache) Dumpable ¶
func (s *CloudletPoolCache) Dumpable() map[string]interface{}
func (*CloudletPoolCache) GetCloudletPoolCache ¶
func (s *CloudletPoolCache) GetCloudletPoolCache(region string) *edgeproto.CloudletPoolCache
func (*CloudletPoolCache) InPool ¶
func (s *CloudletPoolCache) InPool(region string, key edgeproto.CloudletKey) bool
func (*CloudletPoolCache) Init ¶
func (s *CloudletPoolCache) Init()
type CloudletPoolLookup ¶
type CloudletPoolLookup interface { InPool(region string, key edgeproto.CloudletKey) bool GetCloudletPoolCache(region string) *edgeproto.CloudletPoolCache Dumpable() map[string]interface{} }
CloudletPoolLookup interface used by events to determine if cloudlet is in a CloudletPool for proper RBAC marking of events.
type DebugNode ¶
type DebugNode struct {
// contains filtered or unexported fields
}
func (*DebugNode) AddDebugFunc ¶
func (*DebugNode) DebugRequest ¶
func (s *DebugNode) DebugRequest(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_RunDebugServer) error
Handle DebugRequest via grpc API call. Replies are sent back to the grpc client.
func (*DebugNode) RecvDebugReply ¶
func (s *DebugNode) RecvDebugReply(ctx context.Context, reply *edgeproto.DebugReply)
Handle replies from notify children
func (*DebugNode) RecvDebugRequest ¶
func (s *DebugNode) RecvDebugRequest(ctx context.Context, req *edgeproto.DebugRequest)
Handle DebugRequest received via the notify framework. Replies are sent back up the notify connection.
func (*DebugNode) RegisterClient ¶
func (*DebugNode) RegisterServer ¶
type EventData ¶
type EventData struct { // Name of event Name string `json:"name"` // Organizations that scan see event Org []string `json:"org,omitempty"` // Type of event, audit or event Type string `json:"type"` // Region in which event happened Region string `json:"region,omitempty"` // Timestamp of event Timestamp time.Time `json:"timestamp"` // Error if event is logging a failure Error string `json:"error,omitempty"` // Tags associated with event Tags []EventTag `json:"tags,omitempty"` // this is needed for writing to elasticsearch Mtags map[string]string `json:"mtags,omitempty"` // used for show output }
func (*EventData) TagsToMtags ¶
func (s *EventData) TagsToMtags()
type EventDataOld ¶
type EventDataOld struct { Name string `json:"name"` Org string `json:"org,omitempty"` Type string `json:"type"` Region string `json:"region,omitempty"` Timestamp time.Time `json:"timestamp"` Error string `json:"error,omitempty"` Tags []EventTag `json:"tags,omitempty"` // this is needed for writing to elasticsearch }
type EventMatch ¶
type EventMatch struct { // Names of events to match Names []string `json:"names"` // Organizations on events to match Orgs []string `json:"orgs"` // Types of events to match Types []string `json:"types"` // Regions on events to match Regions []string `json:"regions,omitempty"` // Error substring to match Error string `json:"error,omitempty"` // Tags on events to match Tags map[string]string `json:"tags"` // Failure status on event to match Failed bool `json:"failed,omitempty"` }
type EventSearch ¶
type EventSearch struct { // Fields that must match the event Match EventMatch `json:"match,omitempty"` // Fields that must not match the event NotMatch EventMatch `json:"notmatch,omitempty"` // Organizations allowed to access the event AllowedOrgs []string `json:"allowedorgs"` // to enforce rbac // Time range over which to seach for events edgeproto.TimeRange // Start offset if paging through results From int `json:"from,omitempty"` // Display the last X events Limit int `json:"limit,omitempty"` }
type EventTerms ¶
type EventTerms struct { // Names of events Names []AggrVal `json:"names,omitempty"` // Organizations on events Orgs []AggrVal `json:"orgs,omitempty"` // Types of events Types []AggrVal `json:"types,omitempty"` // Regions on events Regions []AggrVal `json:"regions,omitempty"` // Tag keys on events TagKeys []AggrVal `json:"tagkeys,omitempty"` }
type KafkaCreds ¶
type KafkaCreds struct { Endpoint string `json:"endpoint"` Username string `json:"username"` Password string `json:"password"` }
Kafka credentials, put here to avoid import cyclee between node and accessapi
type MatchCA ¶
func AnyRegionalMatchCA ¶
func AnyRegionalMatchCA() MatchCA
func GlobalMatchCA ¶
func GlobalMatchCA() MatchCA
func SameRegionalCloudletMatchCA ¶
func SameRegionalCloudletMatchCA() MatchCA
func SameRegionalMatchCA ¶
func SameRegionalMatchCA() MatchCA
type NodeMgr ¶
type NodeMgr struct { VaultAddr string MyNode edgeproto.Node NodeCache RegionNodeCache Debug DebugNode VaultConfig *vault.Config Region string InternalPki internalPki InternalDomain string OSClient *opensearch.Client ESWroteEvents uint64 DeploymentName string DeploymentTag string AccessKeyClient AccessKeyClient AccessApiClient edgeproto.CloudletAccessApiClient CloudletPoolLookup CloudletPoolLookup CloudletLookup CloudletLookup ValidDomains string // contains filtered or unexported fields }
Node tracks all the nodes connected via notify, and handles common requests over all nodes.
func (*NodeMgr) CommonNamePrefix ¶
func (*NodeMgr) CommonNames ¶
func (*NodeMgr) EventAtTime ¶
func (s *NodeMgr) EventAtTime(ctx context.Context, name, org, typ string, keyTags map[string]string, err error, ts time.Time, keysAndValues ...string)
EventAtTime is the same as event(), but we need the extra level of call stack to get the runtime.Caller() lineno correctly in all cases.
func (*NodeMgr) EventTerms ¶
func (s *NodeMgr) EventTerms(ctx context.Context, search *EventSearch) (*EventTerms, error)
func (*NodeMgr) FindEvents ¶
func (*NodeMgr) GetInternalTlsCAFile ¶
func (*NodeMgr) GetInternalTlsCertFile ¶
func (*NodeMgr) GetInternalTlsKeyFile ¶
func (*NodeMgr) GetPublicClientTlsConfig ¶
Third party services that we deploy all have their own letsencrypt-public issued certificate, with a CA pool that includes the vault internal public CAs. This allows mTLS where the public node uses a public cert and our internal services use an internal vault pki cert. Examples of such services are Jaeger, ElasticSearch, etc.
func (*NodeMgr) InitFlags ¶
func (s *NodeMgr) InitFlags()
Most of the time there will only be one NodeMgr per process, and these settings will come from command line input.
func (*NodeMgr) RegisterClient ¶
func (*NodeMgr) RegisterServer ¶
func (*NodeMgr) SetInternalTlsCAFile ¶
func (*NodeMgr) SetInternalTlsCertFile ¶
setters are only used for unit testing
func (*NodeMgr) SetInternalTlsKeyFile ¶
func (*NodeMgr) ShowEvents ¶
func (*NodeMgr) ShowSpansCondensed ¶
func (s *NodeMgr) ShowSpansCondensed(ctx context.Context, search *SpanSearch) ([]SpanOutCondensed, error)
func (*NodeMgr) TimedEvent ¶
func (*NodeMgr) UpdateMyNode ¶
type NodeOp ¶
type NodeOp func(s *NodeOptions)
func WithCachesLinkToKVStore ¶
func WithCachesLinkToKVStore() NodeOp
func WithCloudletKey ¶
func WithCloudletKey(key *edgeproto.CloudletKey) NodeOp
func WithCloudletLookup ¶
func WithCloudletLookup(cloudletLookup CloudletLookup) NodeOp
func WithCloudletPoolLookup ¶
func WithCloudletPoolLookup(cloudletPoolLookup CloudletPoolLookup) NodeOp
func WithContainerVersion ¶
func WithESUrls ¶
func WithHARole ¶
func WithNoUpdateMyNode ¶
func WithNoUpdateMyNode() NodeOp
func WithParentSpan ¶
func WithRegion ¶
func WithTestTransport ¶
func WithTestTransport(tr http.RoundTripper) NodeOp
func WithVaultConfig ¶
type NodeOptions ¶
type NodeOptions struct {
// contains filtered or unexported fields
}
type NotifyState ¶
type NotifyState struct { ClientStates []*notify.ClientState ServerMgrStates []*notify.ServerMgrState }
type PublicCertManager ¶
type PublicCertManager struct {
// contains filtered or unexported fields
}
PublicCertManager manages refreshing the public cert.
func NewPublicCertManager ¶
func NewPublicCertManager(commonNamePrefix, validDomains string, getPublicCertApi cloudcommon.GetPublicCertApi, tlsCertFile string, tlsKeyFile string) (*PublicCertManager, error)
func (*PublicCertManager) GetCertificateFunc ¶
func (s *PublicCertManager) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
func (*PublicCertManager) GetServerTlsConfig ¶
For now this just assumes server-side only TLS.
func (*PublicCertManager) StartRefresh ¶
func (s *PublicCertManager) StartRefresh()
func (*PublicCertManager) StopRefresh ¶
func (s *PublicCertManager) StopRefresh()
func (*PublicCertManager) TLSMode ¶
func (s *PublicCertManager) TLSMode() mextls.TLSMode
type RegionNodeCache ¶
type RunDebugServer ¶
type RunDebugServer struct { grpc.ServerStream Ctx context.Context ReplyHandler func(m *edgeproto.DebugReply) error }
Struct that allows use of Debug framework from any node Supply a ReplyHandler to handle the DebugReply See notifyroot/appinstlatency_api.go for example use
func (*RunDebugServer) Context ¶
func (c *RunDebugServer) Context() context.Context
func (*RunDebugServer) Send ¶
func (c *RunDebugServer) Send(m *edgeproto.DebugReply) error
type SearchHits ¶
type SearchHits struct { Total SearchVal `json:"total"` Hits []SearchResult `json:"hits"` }
type SearchResp ¶
type SearchResp struct { TimedOut bool `json:"timed_out"` Hits SearchHits `json:"hits"` }
These search structs are just for parsing the search response from ElasticSearch
type SearchResult ¶
type SearchResult struct { Source *json.RawMessage `json:"_source"` Score float32 `json:"_score"` }
type SpanLogOut ¶
type SpanMatch ¶
type SpanMatch struct { TraceIDs []string `json:"traceids"` SpanIDs []string `json:"spanids"` Services []string `json:"services"` Operations []string `json:"operations"` Hostnames []string `json:"hostnames"` TagValues []string `json:"tagvalues"` TagKeyValues map[string]string `json:"tagkeyvalues"` LogMsgs []string `json:"logmsgs"` LogValues []string `json:"logvalues"` LogKeyValues map[string]string `json:"logkeyvalues"` }
type SpanOutCondensed ¶
type SpanOutCondensed struct { TraceID string `json:"traceid,omitempty"` SpanID string `json:"spanid,omitempty"` Service string `json:"service,omitempty"` Operation string `json:"operation,omitempty"` StartTime time.Time `json:"starttime,omitempty"` Duration time.Duration `json:"duration,omitempty"` Hostname string `json:"hostname,omitempty"` Tags map[string]interface{} `json:"tags,omitempty"` Logs []SpanLogOut `json:"logs,omitempty"` }
type SpanSearch ¶
type SpanSearch struct { Match SpanMatch `json:"match,omitempty"` NotMatch SpanMatch `json:"notmatch,omitempty"` edgeproto.TimeRange `json:",inline"` From int `json:"from,omitempty"` // start document offset Limit int `json:"limit,omitempty"` // number of documents to return SearchByRelevance bool `json:"searchbyrelevance"` }
type TlsOp ¶
type TlsOp func(s *TlsOptions)
func WithNoMutualAuth ¶
func WithPublicCAPool ¶
func WithPublicCAPool() TlsOp
func WithTlsServerName ¶
func WithTlsSkipVerify ¶
type TlsOptions ¶
type TlsOptions struct {
// contains filtered or unexported fields
}