Documentation ¶
Overview ¶
Package config contains internal structures and methods relating to managing a client's configuration.
Index ¶
- type Manager
- func (m *Manager) AddRevokedSerials(revoked [][]byte)
- func (m *Manager) ChainRevoked(chain []*x509.Certificate) bool
- func (m *Manager) ClientID() common.ClientID
- func (m *Manager) CommunicatorConfig() *clpb.CommunicatorConfig
- func (m *Manager) Configuration() *config.Configuration
- func (m *Manager) CurrentState() *clpb.ClientState
- func (m *Manager) Labels() []*fspb.Label
- func (m *Manager) RecordRunningService(name string, sig []byte)
- func (m *Manager) Rekey() (err error)
- func (m *Manager) SendConfigUpdate()
- func (m *Manager) SequencingNonce() uint64
- func (m *Manager) SetSequencingNonce(n uint64)
- func (m *Manager) Stop()
- func (m *Manager) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
A Manager stores and manages the current configuration of the client. It exports a view of the current configuration and is safe for concurrent access.
func StartManager ¶
func StartManager(cfg *config.Configuration, configChanges chan<- *fspb.ClientInfoData, c stats.ConfigManagerCollector) (*Manager, error)
StartManager attempts to create a Manager from the provided client configuration.
The labels parameter defines what client labels the client should report to the server. TODO(b/297019580): Consider defining and consuming a more specific `ConfigManagerCollector` interface here, containing only the methods that Manager actually cares about.
func (*Manager) AddRevokedSerials ¶
AddRevokedSerials takes a list of revoked certificate serial numbers and adds them to the configuration's list.
func (*Manager) ChainRevoked ¶
func (m *Manager) ChainRevoked(chain []*x509.Certificate) bool
ChainRevoked returns true if any certificate in provided slice has been revoked.
func (*Manager) CommunicatorConfig ¶
func (m *Manager) CommunicatorConfig() *clpb.CommunicatorConfig
CommunicatorConfig returns the communicator configuration that the client is configured to use.
func (*Manager) Configuration ¶
func (m *Manager) Configuration() *config.Configuration
Configuration returns the configuration struct used to create this client.
func (*Manager) CurrentState ¶
func (m *Manager) CurrentState() *clpb.ClientState
CurrentState returns the client's current dynamic state.
func (*Manager) RecordRunningService ¶
RecordRunningService adds name to the list of services which this client is currently running. This list will be included when sending a ClientInfo record to the server. The optional parameter sig should be set when the configuration was signed to emake it clear to the server which instance of the service is running.
func (*Manager) SendConfigUpdate ¶
func (m *Manager) SendConfigUpdate()
SendConfigUpdate causes a ClientInfo message capturing the current configuration to be sent to the server.
func (*Manager) SequencingNonce ¶
SequencingNonce returns the most recent sequencing nonce known to the client.
func (*Manager) SetSequencingNonce ¶
SetSequencingNonce sets the sequencing nonce received from the server.