Documentation
¶
Index ¶
- Variables
- type AgentFinder
- type ConnectionAuthorizer
- type ControlOperator
- type ProbeOperator
- type RelayOperator
- type Service
- func (s *Service) Authorize(ctx context.Context, req protocol.OperationRequest) error
- func (s *Service) Cancel()
- func (s *Service) Close(ctx context.Context) error
- func (s *Service) Done() <-chan struct{}
- func (s *Service) EnqueueProbe(ctx context.Context, req protocol.OperationRequest, scope protocol.ProbeScope) (protocol.ProbeAck, error)
- func (s *Service) Execute(ctx context.Context, req protocol.OperationRequest) (protocol.OperationAck, error)
- func (s *Service) ForceFullSync(ctx context.Context, req protocol.OperationRequest) (protocol.ForceFullSyncResponse, error)
- func (s *Service) Interrupt(ctx context.Context, req protocol.OperationRequest) (bool, error)
- type Sources
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOperationInvalid = errors.New("operation_invalid") ErrSnapshotEpochChanged = errors.New("snapshot_epoch_changed") ErrInvalidAgentResponse = errors.New("invalid_agent_response") ErrServiceClosed = errors.New("agent operation service is closed") ErrAgentIdentityChanged = errors.New("agent_identity_changed") )
Functions ¶
This section is empty.
Types ¶
type AgentFinder ¶
type ConnectionAuthorizer ¶
type ConnectionAuthorizer interface {
Authorize(agent models.Agent, operation connectivity.Operation) (connectivity.OperationLease, error)
}
type ControlOperator ¶
type ProbeOperator ¶
type RelayOperator ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ctx context.Context, agents AgentFinder, sources Sources) *Service
func (*Service) EnqueueProbe ¶
func (s *Service) EnqueueProbe(ctx context.Context, req protocol.OperationRequest, scope protocol.ProbeScope) (protocol.ProbeAck, error)
func (*Service) Execute ¶
func (s *Service) Execute(ctx context.Context, req protocol.OperationRequest) (protocol.OperationAck, error)
func (*Service) ForceFullSync ¶
func (s *Service) ForceFullSync(ctx context.Context, req protocol.OperationRequest) (protocol.ForceFullSyncResponse, error)
type Sources ¶
type Sources struct {
Connections ConnectionAuthorizer
Control ControlOperator
Relay RelayOperator
Probes ProbeOperator
Now func() time.Time
}
Click to show internal directories.
Click to hide internal directories.