node

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrimaryKey = 0
	BackupKey  = 1
)
View Source
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"
)
View Source
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.

View Source
const NoRegion = ""

Variables

View Source
var (
	NoOrg = ""

	EventType = "event"
	AuditType = "audit"

	DefaultTimeDuration = 48 * time.Hour

	MaxQueuedEvents = 1000
)
View Source
var BadAuthDelay = 3 * time.Second
View Source
var DefaultDebugTimeout = 10 * time.Second
View Source
var GetAccessDataMethod = "/edgeproto.CloudletAccessApi/GetAccessData"
View Source
var NodeTypeAutoProv = "autoprov"
View Source
var NodeTypeCCRM = "ccrm"
View Source
var NodeTypeCRM = "crm"
View Source
var NodeTypeClusterSvc = "cluster-svc"
View Source
var NodeTypeController = "controller"
View Source
var NodeTypeDME = "dme"
View Source
var NodeTypeEdgeTurn = "edgeturn"
View Source
var NodeTypeFRM = "frm"
View Source
var NodeTypeMC = "mc"
View Source
var NodeTypeNotifyRoot = "notifyroot"
View Source
var UpgradeAccessKeyMethod = "/edgeproto.CloudletAccessKeyApi/UpgradeAccessKey"
View Source
var VerifyDelay time.Duration = time.Second
View Source
var VerifyRetry = 30

Functions

func ContextSetAccessKeyVerified

func ContextSetAccessKeyVerified(ctx context.Context, info *AccessKeyVerified) context.Context

func GetKafkaVaultPath

func GetKafkaVaultPath(region, cloudletName, org string) string

func GetMemProfile

func GetMemProfile() string

func LoadPrivPEM

func LoadPrivPEM(key []byte) (ed25519.PrivateKey, error)

func LoadPubPEM

func LoadPubPEM(key []byte) (ed25519.PublicKey, 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 AccessKeyCommitFunc func(ctx context.Context, key *edgeproto.CloudletKey, pubPEM string, role process.HARole) error

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 AggrVal

type AggrVal struct {
	// Key
	Key string `json:"key"`
	// Count of number of documents associated with key
	DocCount int `json:"count,omitempty" yaml:"count,omitempty" mapstructure:"doc_count,omitempty"`
}

type BasicUpgradeHandler

type BasicUpgradeHandler struct {
	KeyServer *AccessKeyServer
}

Basic edgeproto.CloudletAccessKeyApiServer handler for unit tests only.

func (*BasicUpgradeHandler) UpgradeAccessKey

type CertId

type CertId struct {
	CommonNamePrefix string
	CommonName       string // Deprecated, only for older CRMs
	Issuer           string
}

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 DebugFunc

type DebugFunc func(ctx context.Context, req *edgeproto.DebugRequest) string

type DebugNode

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

func (*DebugNode) AddDebugFunc

func (s *DebugNode) AddDebugFunc(cmd string, f DebugFunc)

func (*DebugNode) DebugRequest

Handle DebugRequest via grpc API call. Replies are sent back to the grpc client.

func (*DebugNode) Init

func (s *DebugNode) Init(mgr *NodeMgr)

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 (s *DebugNode) RegisterClient(client *notify.Client)

func (*DebugNode) RegisterServer

func (s *DebugNode) RegisterServer(server *notify.ServerMgr)

func (*DebugNode) RunDebug

func (s *DebugNode) RunDebug(ctx context.Context, req *edgeproto.DebugRequest) string

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
	// Tags associated with event
	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
	Mtags     map[string]string `json:"mtags,omitempty"` // used for show output
}

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 EventTag

type EventTag struct {
	// Event tag key
	Key string `json:"key"`
	// Event tag value
	Value string `json:"value"`
}

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 KeyPair

type KeyPair struct {
	PrivatePEM string
	PublicPEM  string
}

func GenerateAccessKey

func GenerateAccessKey() (*KeyPair, error)

Generate ed25519 key pair

type KeyType

type KeyType int

type MatchCA

type MatchCA struct {
	Issuer             string
	RequireRegionMatch bool
}

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 (s *NodeMgr) CommonNamePrefix() string

func (*NodeMgr) CommonNames

func (s *NodeMgr) CommonNames() []string

func (*NodeMgr) Event

func (s *NodeMgr) Event(ctx context.Context, name, org string, keyTags map[string]string, err error, keysAndValues ...string)

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 (s *NodeMgr) FindEvents(ctx context.Context, search *EventSearch) ([]EventData, error)

func (*NodeMgr) Finish

func (s *NodeMgr) Finish()

func (*NodeMgr) GetInternalTlsCAFile

func (s *NodeMgr) GetInternalTlsCAFile() string

func (*NodeMgr) GetInternalTlsCertFile

func (s *NodeMgr) GetInternalTlsCertFile() string

func (*NodeMgr) GetInternalTlsKeyFile

func (s *NodeMgr) GetInternalTlsKeyFile() string

func (*NodeMgr) GetPublicClientTlsConfig

func (s *NodeMgr) GetPublicClientTlsConfig(ctx context.Context) (*tls.Config, error)

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) Init

func (s *NodeMgr) Init(nodeType, tlsClientIssuer string, ops ...NodeOp) (context.Context, opentracing.Span, error)

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) Name

func (s *NodeMgr) Name() string

func (*NodeMgr) RegisterClient

func (s *NodeMgr) RegisterClient(client *notify.Client)

func (*NodeMgr) RegisterServer

func (s *NodeMgr) RegisterServer(server *notify.ServerMgr)

func (*NodeMgr) SetInternalTlsCAFile

func (s *NodeMgr) SetInternalTlsCAFile(file string)

func (*NodeMgr) SetInternalTlsCertFile

func (s *NodeMgr) SetInternalTlsCertFile(file string)

setters are only used for unit testing

func (*NodeMgr) SetInternalTlsKeyFile

func (s *NodeMgr) SetInternalTlsKeyFile(file string)

func (*NodeMgr) ShowEvents

func (s *NodeMgr) ShowEvents(ctx context.Context, search *EventSearch) ([]EventData, error)

func (*NodeMgr) ShowSpans

func (s *NodeMgr) ShowSpans(ctx context.Context, search *SpanSearch) ([]dbmodel.Span, error)

func (*NodeMgr) ShowSpansCondensed

func (s *NodeMgr) ShowSpansCondensed(ctx context.Context, search *SpanSearch) ([]SpanOutCondensed, error)

func (*NodeMgr) SpanTerms

func (s *NodeMgr) SpanTerms(ctx context.Context, search *SpanSearch) (*SpanTerms, error)

func (*NodeMgr) TimedEvent

func (s *NodeMgr) TimedEvent(ctx context.Context, name, org, typ string, keyTags map[string]string, err error, startTime, endTime time.Time, keysAndValues ...string)

func (*NodeMgr) UpdateMyNode

func (s *NodeMgr) UpdateMyNode(ctx context.Context)

func (*NodeMgr) UpdateNodeProps

func (s *NodeMgr) UpdateNodeProps(ctx context.Context, props map[string]string)

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 WithContainerVersion(ver string) NodeOp

func WithESUrls

func WithESUrls(urls string) NodeOp

func WithHARole

func WithHARole(haRole process.HARole) NodeOp

func WithName

func WithName(name string) NodeOp

func WithNoUpdateMyNode

func WithNoUpdateMyNode() NodeOp

func WithParentSpan

func WithParentSpan(parentSpan string) NodeOp

func WithRegion

func WithRegion(region string) NodeOp

func WithTestTransport

func WithTestTransport(tr http.RoundTripper) NodeOp

func WithVaultConfig

func WithVaultConfig(vaultConfig *vault.Config) NodeOp

type NodeOptions

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

type NotifyState

type NotifyState struct {
	ClientStates    []*notify.ClientState
	ServerMgrStates []*notify.ServerMgrState
}

type PubCert

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

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

func (s *PublicCertManager) GetServerTlsConfig(ctx context.Context) (*tls.Config, error)

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 RegionNodeCache struct {
	edgeproto.NodeCache
	// contains filtered or unexported fields
}

func (*RegionNodeCache) Delete

func (s *RegionNodeCache) Delete(ctx context.Context, in *edgeproto.Node, rev int64)

func (*RegionNodeCache) Prune

func (s *RegionNodeCache) Prune(ctx context.Context, validKeys map[edgeproto.NodeKey]struct{})

func (*RegionNodeCache) Update

func (s *RegionNodeCache) Update(ctx context.Context, in *edgeproto.Node, rev int64)

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

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 SearchVal

type SearchVal struct {
	Value    int    `json:"value"`
	Relation string `json:"relation"`
}

type SpanLogOut

type SpanLogOut struct {
	Msg       string                 `json:"msg"`
	Timestamp time.Time              `json:"timestamp"`
	Lineno    string                 `json:"lineno"`
	KeyValues map[string]interface{} `json:"keyvalues"`
}

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 SpanTerms

type SpanTerms struct {
	Operations []AggrVal `json:"operations"`
	Services   []AggrVal `json:"services"`
	Hostnames  []AggrVal `json:"hostnames"`
	Msgs       []AggrVal `json:"msgs"`
	Tags       []AggrVal `json:"tags"`
}

type TlsOp

type TlsOp func(s *TlsOptions)

func WithNoMutualAuth

func WithNoMutualAuth(noMutualAuth bool) TlsOp

func WithPublicCAPool

func WithPublicCAPool() TlsOp

func WithTlsServerName

func WithTlsServerName(name string) TlsOp

func WithTlsSkipVerify

func WithTlsSkipVerify(skipVerify bool) TlsOp

type TlsOptions

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

type VaultCert

type VaultCert struct {
	PublicCertPEM []byte
	PrivateKeyPEM []byte
}

Jump to

Keyboard shortcuts

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