Documentation
¶
Index ¶
- func InitTracer(tracing env.Tracing, id string) (io.Closer, error)
- func LoadClientChains(db renewal.DB, configDir string) error
- func LoadCorePolicies(cfg config.Policies) (beacon.CorePolicies, error)
- func LoadNonCorePolicies(cfg config.Policies) (beacon.Policies, error)
- func LoadTrustMaterial(configDir string, db trust.DB, logger log.Logger) error
- func MACGenFactory(configDir string) (func() hash.Hash, error)
- func NewChainBuilder(ia addr.IA, db trust.DB, maxVal time.Duration, configDir string) cstrust.ChainBuilder
- func NewOneHopConn(ia addr.IA, pub *net.UDPAddr, disp string, reconnecting bool) (*snet.SCIONPacketConn, error)
- func NewSigner(ia addr.IA, db trust.DB, cfgDir string) (cstrust.RenewingSigner, error)
- func StartHTTPEndpoints(elemId string, cfg interface{}, signer cstrust.RenewingSigner, ...) error
- type Metrics
- type RevocationHandler
- type Store
- type Tasks
- type TasksConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTracer ¶
InitTracer initializes the global tracer.
func LoadClientChains ¶
LoadClientChains loads the client certificate chains.
func LoadCorePolicies ¶
func LoadCorePolicies(cfg config.Policies) (beacon.CorePolicies, error)
LoadCorePolicies loads the policies for beaconing in a core CS.
func LoadNonCorePolicies ¶
LoadNonCorePolicies loads the policies for beaconing in a non-core CS.
func LoadTrustMaterial ¶
LoadTrustMaterial loads the trust material from disk. The logger must not be nil.
func MACGenFactory ¶
MACGenFactory creates a MAC factory
func NewChainBuilder ¶
func NewChainBuilder(ia addr.IA, db trust.DB, maxVal time.Duration, configDir string) cstrust.ChainBuilder
NewChainBuilder creates a renewing chain builder.
func NewOneHopConn ¶
func NewOneHopConn(ia addr.IA, pub *net.UDPAddr, disp string, reconnecting bool) (*snet.SCIONPacketConn, error)
NewOneHopConn registers a new connection that should be used with one hop paths.
func StartHTTPEndpoints ¶
func StartHTTPEndpoints(elemId string, cfg interface{}, signer cstrust.RenewingSigner, ca cstrust.ChainBuilder, metrics env.Metrics) error
StartHTTPEndpoints starts the HTTP endpoints that expose the metrics and additional information.
Types ¶
type Metrics ¶
type Metrics struct {
BeaconingOriginatedTotal *prometheus.CounterVec
BeaconingPropagatedTotal *prometheus.CounterVec
BeaconingPropagatorInternalErrorsTotal *prometheus.CounterVec
BeaconingReceivedTotal *prometheus.CounterVec
BeaconingRegisteredTotal *prometheus.CounterVec
BeaconingRegistrarInternalErrorsTotal *prometheus.CounterVec
DiscoveryRequestsTotal *prometheus.CounterVec
SegmentLookupRequestsTotal *prometheus.CounterVec
SegmentLookupSegmentsSentTotal *prometheus.CounterVec
SegmentRegistrationsTotal *prometheus.CounterVec
}
Metrics defines the metrics exposed by the control server.
XXX(roosd): Currently, most counters are created in the packages. The will eventually be moved here.
func NewMetrics ¶
func NewMetrics() *Metrics
type RevocationHandler ¶
RevocationHandler handles raw revocations from the snet stack and inserts them into the
type Store ¶
type Store interface {
// PreFilter indicates whether the beacon will be filtered on insert by
// returning an error with the reason. This allows the caller to drop
// ignored beacons.
PreFilter(beacon beacon.Beacon) error
// BeaconsToPropagate returns a channel that provides all beacons to
// propagate at the time of the call. The selection is based on the
// configured propagation policy.
BeaconsToPropagate(ctx context.Context) (<-chan beacon.BeaconOrErr, error)
// SegmentsToRegister returns a channel that provides all beacons to
// register at the time of the call. The selections is based on the
// configured propagation policy for the requested segment type.
SegmentsToRegister(ctx context.Context, segType seg.Type) (
<-chan beacon.BeaconOrErr, error)
// InsertBeacon adds a verified beacon to the store, ignoring revocations.
InsertBeacon(ctx context.Context, beacon beacon.Beacon) (beacon.InsertStats, error)
// InsertRevocations inserts the revocation into the BeaconDB.
// The provided revocation must be verified by the caller.
InsertRevocations(ctx context.Context, revocations ...*path_mgmt.SignedRevInfo) error
// DeleteRevocation deletes the revocation from the BeaconDB.
DeleteRevocation(ctx context.Context, ia addr.IA, ifid common.IFIDType) error
// UpdatePolicy updates the policy. Beacons that are filtered by all
// policies after the update are removed.
UpdatePolicy(ctx context.Context, policy beacon.Policy) error
// MaxExpTime returns the segment maximum expiration time for the given policy.
MaxExpTime(policyType beacon.PolicyType) uint8
// DeleteExpired deletes expired Beacons from the store.
DeleteExpiredBeacons(ctx context.Context) (int, error)
// DeleteExpiredRevocations deletes expired Revocations from the store.
DeleteExpiredRevocations(ctx context.Context) (int, error)
// Close closes the store.
Close() error
}
Store is the interface to interact with the beacon store.
type Tasks ¶
type Tasks struct {
Originator *periodic.Runner
Propagator *periodic.Runner
Registrars []*periodic.Runner
BeaconCleaner *periodic.Runner
PathCleaner *periodic.Runner
}
Tasks keeps track of the running tasks.
func StartTasks ¶
func StartTasks(cfg TasksConfig) (*Tasks, error)
type TasksConfig ¶
type TasksConfig struct {
Public *net.UDPAddr
Intfs *ifstate.Interfaces
OneHopConn snet.PacketConn
TrustDB trust.DB
PathDB pathdb.PathDB
RevCache revcache.RevCache
BeaconSender beaconing.BeaconSender
SegmentRegister beaconing.RPC
BeaconStore Store
Signer seg.Signer
Inspector trust.Inspector
Metrics *Metrics
MACGen func() hash.Hash
TopoProvider topology.Provider
StaticInfo func() *beaconing.StaticInfoCfg
OriginationInterval time.Duration
PropagationInterval time.Duration
RegistrationInterval time.Duration
AllowIsdLoop bool
}
TasksConfig holds the necessary configuration to start the periodic tasks a CS is expected to run.
func (*TasksConfig) Originator ¶
func (t *TasksConfig) Originator() *periodic.Runner
Originator starts a periodic beacon origination task. For non-core ASes, no periodic runner is started.
func (*TasksConfig) Propagator ¶
func (t *TasksConfig) Propagator() *periodic.Runner
Propagator starts a periodic beacon propagation task.
func (*TasksConfig) SegmentWriters ¶
func (t *TasksConfig) SegmentWriters() []*periodic.Runner
SegmentWriters starts periodic segment registration tasks.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
grpc/mock_grpc
Package mock_grpc is a generated GoMock package.
|
Package mock_grpc is a generated GoMock package. |
|
mock_trust
Package mock_trust is a generated GoMock package.
|
Package mock_trust is a generated GoMock package. |