Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + const BackupKey + const CertIssuerGlobal + const CertIssuerRegional + const CertIssuerRegionalCloudlet + const DisableDebugLevels + const DisableSampleLog + const DumpCloudletPools + const DumpNotifyConns + const DumpStackTrace + const EnableDebugLevels + const EnableSampleLog + const GetMemProfileCmd + const NoRegion + const NoTlsClientIssuer + const PrimaryKey + const RefreshInternalCerts + const ShowDebugLevels + const StartCpuProfileCmd + const StopCpuProfileCmd + var AuditType = "audit" + var BadAuthDelay = 3 * time.Second + var DefaultDebugTimeout = 10 * time.Second + var DefaultTimeDuration = 48 * time.Hour + var EventType = "event" + var GetAccessDataMethod = "/edgeproto.CloudletAccessApi/GetAccessData" + var MaxQueuedEvents = 1000 + var NoOrg = "" + 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 + 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 struct + AccessApiAddr string + AccessKeyFile string + TestSkipTlsVerify bool + 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 func(ctx context.Context, key *edgeproto.CloudletKey, pubPEM string, ...) error + type AccessKeyGrpcServer struct + AccessKeyServer *AccessKeyServer + func (s *AccessKeyGrpcServer) ApiAddr() string + func (s *AccessKeyGrpcServer) Start(addr string, keyServer *AccessKeyServer, tlsConfig *tls.Config, ...) error + func (s *AccessKeyGrpcServer) Stop() + type AccessKeyServer struct + func NewAccessKeyServer(cloudletCache *edgeproto.CloudletCache, vaultAddr string) *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 struct + Key edgeproto.CloudletKey + UpgradeRequired bool + func ContextGetAccessKeyVerified(ctx context.Context) *AccessKeyVerified + type AccessKeyVerifyOnly bool + const AccessKeyUpgrade + const AccessKeyVerify + type AggrResult struct + Buckets []AggrVal + type AggrVal struct + DocCount int + Key string + type BasicUpgradeHandler struct + KeyServer *AccessKeyServer + func (s *BasicUpgradeHandler) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer) error + type CertId struct + CommonName string + CommonNamePrefix string + Issuer string + type CloudletCache struct + func (s *CloudletCache) GetCloudlet(region string, key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool + func (s *CloudletCache) GetCloudletCache(region string) *edgeproto.CloudletCache + func (s *CloudletCache) Init() + type CloudletInPoolFunc func(region, key edgeproto.CloudletKey) bool + type CloudletLookup interface + GetCloudlet func(region string, key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool + GetCloudletCache func(region string) *edgeproto.CloudletCache + type CloudletPoolCache struct + PoolsByCloudlet edgeproto.CloudletPoolByCloudletKey + func (s *CloudletPoolCache) Dumpable() map[string]interface{} + func (s *CloudletPoolCache) GetCloudletPoolCache(region string) *edgeproto.CloudletPoolCache + func (s *CloudletPoolCache) InPool(region string, key edgeproto.CloudletKey) bool + func (s *CloudletPoolCache) Init() + type CloudletPoolLookup interface + Dumpable func() map[string]interface{} + GetCloudletPoolCache func(region string) *edgeproto.CloudletPoolCache + InPool func(region string, key edgeproto.CloudletKey) bool + type DebugFunc func(ctx context.Context, req *edgeproto.DebugRequest) string + type DebugNode struct + 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 struct + Error string + Mtags map[string]string + Name string + Org []string + Region string + Tags []EventTag + Timestamp time.Time + Type string + func (s *EventData) TagsToMtags() + type EventDataOld struct + Error string + Mtags map[string]string + Name string + Org string + Region string + Tags []EventTag + Timestamp time.Time + Type string + type EventMatch struct + Error string + Failed bool + Names []string + Orgs []string + Regions []string + Tags map[string]string + Types []string + type EventSearch struct + AllowedOrgs []string + From int + Limit int + Match EventMatch + NotMatch EventMatch + type EventTag struct + Key string + Value string + type EventTerms struct + Names []AggrVal + Orgs []AggrVal + Regions []AggrVal + TagKeys []AggrVal + Types []AggrVal + type KafkaCreds struct + Endpoint string + Password string + Username string + type KeyPair struct + PrivatePEM string + PublicPEM string + func GenerateAccessKey() (*KeyPair, error) + type KeyType int + type MatchCA struct + Issuer string + RequireRegionMatch bool + func AnyRegionalMatchCA() MatchCA + func GlobalMatchCA() MatchCA + func SameRegionalCloudletMatchCA() MatchCA + func SameRegionalMatchCA() MatchCA + type NodeMgr struct + AccessApiClient edgeproto.CloudletAccessApiClient + AccessKeyClient AccessKeyClient + CloudletLookup CloudletLookup + CloudletPoolLookup CloudletPoolLookup + Debug DebugNode + DeploymentName string + DeploymentTag string + ESWroteEvents uint64 + InternalDomain string + InternalPki internalPki + MyNode edgeproto.Node + NodeCache RegionNodeCache + OSClient *opensearch.Client + Region string + ValidDomains string + VaultAddr string + VaultConfig *vault.Config + 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(s *NodeOptions) + 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 struct + type NotifyState struct + ClientStates []*notify.ClientState + ServerMgrStates []*notify.ServerMgrState + type PubCert struct + type PublicCertManager struct + func NewPublicCertManager(commonNamePrefix, validDomains string, ...) (*PublicCertManager, error) + 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 struct + func (s *RegionNodeCache) Delete(ctx context.Context, in *edgeproto.Node, rev int64) + func (s *RegionNodeCache) Prune(ctx context.Context, validKeys map[edgeproto.NodeKey]struct{}) + func (s *RegionNodeCache) Update(ctx context.Context, in *edgeproto.Node, rev int64) + type RunDebugServer struct + Ctx context.Context + ReplyHandler func(m *edgeproto.DebugReply) error + func (c *RunDebugServer) Context() context.Context + func (c *RunDebugServer) Send(m *edgeproto.DebugReply) error + type SearchHits struct + Hits []SearchResult + Total SearchVal + type SearchResp struct + Hits SearchHits + TimedOut bool + type SearchResult struct + Score float32 + Source *json.RawMessage + type SearchVal struct + Relation string + Value int + type SpanLogOut struct + KeyValues map[string]interface{} + Lineno string + Msg string + Timestamp time.Time + type SpanMatch struct + Hostnames []string + LogKeyValues map[string]string + LogMsgs []string + LogValues []string + Operations []string + Services []string + SpanIDs []string + TagKeyValues map[string]string + TagValues []string + TraceIDs []string + type SpanOutCondensed struct + Duration time.Duration + Hostname string + Logs []SpanLogOut + Operation string + Service string + SpanID string + StartTime time.Time + Tags map[string]interface{} + TraceID string + type SpanSearch struct + From int + Limit int + Match SpanMatch + NotMatch SpanMatch + SearchByRelevance bool + type SpanTerms struct + Hostnames []AggrVal + Msgs []AggrVal + Operations []AggrVal + Services []AggrVal + Tags []AggrVal + type TlsOp func(s *TlsOptions) + func WithNoMutualAuth(noMutualAuth bool) TlsOp + func WithPublicCAPool() TlsOp + func WithTlsServerName(name string) TlsOp + func WithTlsSkipVerify(skipVerify bool) TlsOp + type TlsOptions struct + type VaultCert struct + PrivateKeyPEM []byte + PublicCertPEM []byte