Documentation
¶
Index ¶
- Constants
- Variables
- type AgentAuthResult
- type AgentConfig
- type AgentConfigCompiler
- type AgentConfigInput
- type AgentHelloInput
- type AgentRuntimeMetricsInput
- type AgentTrafficReportInput
- type AgentUpdatePolicyInput
- type AgentUpgradeBatchInput
- type Authorizer
- type BasicAgentConfigCompiler
- type BootstrapInput
- type ConfigApplyErrorInput
- type ControlService
- func (service *ControlService) AcknowledgeMonitorAgentConfig(ctx context.Context, organizationID string, monitorID string, ...) error
- func (service *ControlService) AcknowledgeNodeAgentConfig(ctx context.Context, organizationID string, nodeID string, configVersion int, ...) error
- func (service *ControlService) AddMember(ctx context.Context, identity InternalIdentity, input MemberMutationInput) (MemberPayload, error)
- func (service *ControlService) AgentReleaseVersion() string
- func (service *ControlService) AuthenticateAgentToken(ctx context.Context, agentType string, token string) (AgentAuthResult, error)
- func (service *ControlService) AuthorizeNodeMetricsStream(ctx context.Context, identity InternalIdentity, nodeID string) error
- func (service *ControlService) BatchRules(ctx context.Context, identity InternalIdentity, input RuleBatchInput) (RuleBatchResult, error)
- func (service *ControlService) Bootstrap(ctx context.Context, identity WebUserIdentity, input BootstrapInput) (SessionResult, error)
- func (service *ControlService) CompileMonitorAgentConfig(ctx context.Context, organizationID string, monitorID string) (agent.MonitorConfigSnapshot, error)
- func (service *ControlService) CompileNodeAgentConfig(ctx context.Context, organizationID string, nodeID string) (AgentConfig, error)
- func (service *ControlService) CopyRule(ctx context.Context, identity InternalIdentity, ruleID string, ...) (RulePayload, error)
- func (service *ControlService) CreateDNSCredential(ctx context.Context, identity InternalIdentity, ...) (DNSCredentialPayload, error)
- func (service *ControlService) CreateDNSInstance(ctx context.Context, identity InternalIdentity, input DNSInstanceMutationInput) (DNSInstancePayload, error)
- func (service *ControlService) CreateDNSManagedRecord(ctx context.Context, identity InternalIdentity, ...) (DNSManagedRecordPayload, error)
- func (service *ControlService) CreateHealthCheck(ctx context.Context, identity InternalIdentity, input HealthCheckMutationInput) (HealthCheckPayload, error)
- func (service *ControlService) CreateHealthEvaluationRule(ctx context.Context, identity InternalIdentity, ...) (HealthEvaluationRulePayload, error)
- func (service *ControlService) CreateMonitor(ctx context.Context, identity InternalIdentity, input MonitorMutationInput) (MonitorPayload, error)
- func (service *ControlService) CreateMonitorGroup(ctx context.Context, identity InternalIdentity, input GroupMutationInput) (MonitorGroupPayload, error)
- func (service *ControlService) CreateNode(ctx context.Context, identity InternalIdentity, input NodeMutationInput) (NodePayload, error)
- func (service *ControlService) CreateNodeGroup(ctx context.Context, identity InternalIdentity, input GroupMutationInput) (NodeGroupPayload, error)
- func (service *ControlService) CreateNotificationChannel(ctx context.Context, identity InternalIdentity, ...) (NotificationChannelPayload, error)
- func (service *ControlService) CreateRegistrationToken(ctx context.Context, identity InternalIdentity, agentType string, ...) (RegistrationTokenPayload, error)
- func (service *ControlService) CreateRole(ctx context.Context, identity InternalIdentity, input RoleMutationInput) (RolePayload, error)
- func (service *ControlService) CreateRule(ctx context.Context, identity InternalIdentity, input RuleMutationInput) (RulePayload, error)
- func (service *ControlService) CreateTarget(ctx context.Context, identity InternalIdentity, input TargetMutationInput) (TargetPayload, error)
- func (service *ControlService) CreateTargetGroup(ctx context.Context, identity InternalIdentity, input TargetGroupMutationInput) (TargetGroupPayload, error)
- func (service *ControlService) DeleteDNSCredential(ctx context.Context, identity InternalIdentity, credentialID string) error
- func (service *ControlService) DeleteDNSInstance(ctx context.Context, identity InternalIdentity, instanceID string) error
- func (service *ControlService) DeleteDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string) error
- func (service *ControlService) DeleteHealthCheck(ctx context.Context, identity InternalIdentity, healthCheckID string) error
- func (service *ControlService) DeleteMember(ctx context.Context, identity InternalIdentity, memberID string) error
- func (service *ControlService) DeleteMonitor(ctx context.Context, identity InternalIdentity, monitorID string) error
- func (service *ControlService) DeleteMonitorGroup(ctx context.Context, identity InternalIdentity, monitorGroupID string) error
- func (service *ControlService) DeleteNode(ctx context.Context, identity InternalIdentity, nodeID string) error
- func (service *ControlService) DeleteNodeGroup(ctx context.Context, identity InternalIdentity, nodeGroupID string) error
- func (service *ControlService) DeleteNotificationChannel(ctx context.Context, identity InternalIdentity, channelID string) error
- func (service *ControlService) DeleteRole(ctx context.Context, identity InternalIdentity, roleID string) error
- func (service *ControlService) DeleteRule(ctx context.Context, identity InternalIdentity, ruleID string) error
- func (service *ControlService) DeleteTarget(ctx context.Context, identity InternalIdentity, targetID string) error
- func (service *ControlService) DeleteTargetGroup(ctx context.Context, identity InternalIdentity, targetGroupID string) error
- func (service *ControlService) DisableRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
- func (service *ControlService) EnableRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
- func (service *ControlService) EvaluateDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string) (DNSManagedRecordPayload, error)
- func (service *ControlService) ExportRules(ctx context.Context, identity InternalIdentity, ruleIDs []string) (RulesExportPayload, error)
- func (service *ControlService) FinalizeAgentRegistrationDelivery(ctx context.Context, authResult AgentAuthResult) error
- func (service *ControlService) GetMonitor(ctx context.Context, identity InternalIdentity, monitorID string) (MonitorPayload, error)
- func (service *ControlService) GetNode(ctx context.Context, identity InternalIdentity, nodeID string) (NodePayload, error)
- func (service *ControlService) GetRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
- func (service *ControlService) ImportRules(ctx context.Context, identity InternalIdentity, input RuleImportInput) (RulesImportResult, error)
- func (service *ControlService) ListDNSCredentials(ctx context.Context, identity InternalIdentity) ([]DNSCredentialPayload, error)
- func (service *ControlService) ListDNSInstances(ctx context.Context, identity InternalIdentity) ([]DNSInstancePayload, error)
- func (service *ControlService) ListDNSManagedRecords(ctx context.Context, identity InternalIdentity) ([]DNSManagedRecordPayload, error)
- func (service *ControlService) ListHealthChecks(ctx context.Context, identity InternalIdentity) ([]HealthCheckPayload, error)
- func (service *ControlService) ListHealthResults(ctx context.Context, identity InternalIdentity, healthCheckID string) ([]HealthResultPayload, error)
- func (service *ControlService) ListMembers(ctx context.Context, identity InternalIdentity) ([]MemberPayload, error)
- func (service *ControlService) ListMonitorGroups(ctx context.Context, identity InternalIdentity) ([]MonitorGroupPayload, error)
- func (service *ControlService) ListMonitors(ctx context.Context, identity InternalIdentity) ([]MonitorPayload, error)
- func (service *ControlService) ListNodeGroupOptions(ctx context.Context, identity InternalIdentity, accessLevel string) ([]ResourceOption, error)
- func (service *ControlService) ListNodeGroups(ctx context.Context, identity InternalIdentity) ([]NodeGroupPayload, error)
- func (service *ControlService) ListNodes(ctx context.Context, identity InternalIdentity) ([]NodePayload, error)
- func (service *ControlService) ListNotificationChannels(ctx context.Context, identity InternalIdentity) ([]NotificationChannelPayload, error)
- func (service *ControlService) ListRegistrationTokens(ctx context.Context, identity InternalIdentity, agentType string, ...) ([]RegistrationTokenPayload, error)
- func (service *ControlService) ListRoles(ctx context.Context, identity InternalIdentity) ([]RolePayload, error)
- func (service *ControlService) ListRules(ctx context.Context, identity InternalIdentity) ([]RulePayload, error)
- func (service *ControlService) ListTargetGroups(ctx context.Context, identity InternalIdentity) ([]TargetGroupPayload, error)
- func (service *ControlService) ListTargets(ctx context.Context, identity InternalIdentity) ([]TargetPayload, error)
- func (service *ControlService) MarkMonitorAgentConnected(ctx context.Context, organizationID string, monitorID string) error
- func (service *ControlService) MarkMonitorAgentDisconnected(ctx context.Context, organizationID string, monitorID string) error
- func (service *ControlService) MarkNodeAgentConnected(ctx context.Context, organizationID string, nodeID string) error
- func (service *ControlService) MarkNodeAgentConnectedFromRemote(ctx context.Context, organizationID string, nodeID string, remoteAddr string) error
- func (service *ControlService) MarkNodeAgentDisconnected(ctx context.Context, organizationID string, nodeID string) error
- func (service *ControlService) NodeAgentConfigBehind(ctx context.Context, organizationID string, nodeID string, ...) (bool, error)
- func (service *ControlService) NodeGroupListenIPOptions(ctx context.Context, identity InternalIdentity, nodeGroupID string, ...) ([]ResourceOption, error)
- func (service *ControlService) PendingNodeAgentUpdate(ctx context.Context, organizationID string, nodeID string) (string, bool, error)
- func (service *ControlService) RecordMonitorHealthResults(ctx context.Context, organizationID string, monitorID string, ...) error
- func (service *ControlService) RecordNodeAgentHello(ctx context.Context, organizationID string, nodeID string, ...) (NodePayload, bool, error)
- func (service *ControlService) RecordNodeAgentUpdateResult(ctx context.Context, organizationID string, nodeID string, status string, ...) error
- func (service *ControlService) RecordNodeTrafficReport(ctx context.Context, organizationID string, nodeID string, ...) (bool, error)
- func (service *ControlService) RefreshDNSCredentialZones(ctx context.Context, identity InternalIdentity, credentialID string) (DNSCredentialPayload, error)
- func (service *ControlService) ReleaseAgentRegistrationCredential(ctx context.Context, authResult AgentAuthResult) error
- func (service *ControlService) RequestNodeAgentUpgrade(ctx context.Context, identity InternalIdentity, nodeID string) (NodePayload, error)
- func (service *ControlService) RequestNodeAgentUpgrades(ctx context.Context, identity InternalIdentity, input AgentUpgradeBatchInput) ([]NodePayload, error)
- func (service *ControlService) RevokeRegistrationToken(ctx context.Context, identity InternalIdentity, agentType string, ...) error
- func (service *ControlService) RuleDiagnostics(ctx context.Context, identity InternalIdentity, ruleID string, ...) (RuleDiagnosticsPayload, error)
- func (service *ControlService) RuleTraffic(ctx context.Context, identity InternalIdentity, ruleID string) (RuleTrafficPayload, error)
- func (service *ControlService) SessionForInternalIdentity(ctx context.Context, identity InternalIdentity) (SessionResult, error)
- func (service *ControlService) SessionForWebUser(ctx context.Context, identity WebUserIdentity) (SessionResult, error)
- func (service *ControlService) SupportedHealthActionTypes() []string
- func (service *ControlService) TargetGroupOptions(ctx context.Context, identity InternalIdentity, protocol string) ([]ResourceOption, error)
- func (service *ControlService) TargetOptions(ctx context.Context, identity InternalIdentity, protocol string) ([]ResourceOption, error)
- func (service *ControlService) UpdateDNSCredential(ctx context.Context, identity InternalIdentity, credentialID string, ...) (DNSCredentialPayload, error)
- func (service *ControlService) UpdateDNSInstance(ctx context.Context, identity InternalIdentity, instanceID string, ...) (DNSInstancePayload, error)
- func (service *ControlService) UpdateDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string, ...) (DNSManagedRecordPayload, error)
- func (service *ControlService) UpdateHealthCheck(ctx context.Context, identity InternalIdentity, healthCheckID string, ...) (HealthCheckPayload, error)
- func (service *ControlService) UpdateMember(ctx context.Context, identity InternalIdentity, memberID string, ...) (MemberPayload, error)
- func (service *ControlService) UpdateMonitor(ctx context.Context, identity InternalIdentity, monitorID string, ...) (MonitorPayload, error)
- func (service *ControlService) UpdateMonitorGroup(ctx context.Context, identity InternalIdentity, monitorGroupID string, ...) (MonitorGroupPayload, error)
- func (service *ControlService) UpdateNode(ctx context.Context, identity InternalIdentity, nodeID string, ...) (NodePayload, error)
- func (service *ControlService) UpdateNodeAgentUpdatePolicy(ctx context.Context, identity InternalIdentity, nodeID string, ...) (NodePayload, error)
- func (service *ControlService) UpdateNodeGroup(ctx context.Context, identity InternalIdentity, nodeGroupID string, ...) (NodeGroupPayload, error)
- func (service *ControlService) UpdateNotificationChannel(ctx context.Context, identity InternalIdentity, channelID string, ...) (NotificationChannelPayload, error)
- func (service *ControlService) UpdateOrganization(ctx context.Context, identity InternalIdentity, input OrganizationUpdateInput) (OrganizationPayload, error)
- func (service *ControlService) UpdateRole(ctx context.Context, identity InternalIdentity, roleID string, ...) (RolePayload, error)
- func (service *ControlService) UpdateRule(ctx context.Context, identity InternalIdentity, ruleID string, ...) (RulePayload, error)
- func (service *ControlService) UpdateTarget(ctx context.Context, identity InternalIdentity, targetID string, ...) (TargetPayload, error)
- func (service *ControlService) UpdateTargetGroup(ctx context.Context, identity InternalIdentity, targetGroupID string, ...) (TargetGroupPayload, error)
- func (service *ControlService) ValidateAgentToken(ctx context.Context, agentType string, token string) (AgentAuthResult, error)
- type ControlServiceOptions
- type DNSCredentialMutationInput
- type DNSCredentialPayload
- type DNSCredentialZonePayload
- type DNSDiagnosticPayload
- type DNSInstanceMutationInput
- type DNSInstancePayload
- type DNSManagedRecordMutationInput
- type DNSManagedRecordPayload
- type ErrorPayload
- type GroupMutationInput
- type HealthActionExecutionInput
- type HealthActionExecutor
- type HealthActionRegistry
- type HealthActionTypesProvider
- type HealthCheckMutationInput
- type HealthCheckPayload
- type HealthCheckTargetPayload
- type HealthEvaluationRuleMutationInput
- type HealthEvaluationRulePayload
- type HealthEventExecutionInput
- type HealthEventExecutor
- type HealthEventMutationInput
- type HealthEventPayload
- type HealthMonitorScopeInput
- type HealthMonitorScopePayload
- type HealthResultInput
- type HealthResultPayload
- type HealthTargetScopeInput
- type HealthTargetScopePayload
- type InternalIdentity
- type MemberMutationInput
- type MemberPayload
- type MonitorGroupPayload
- type MonitorMutationInput
- type MonitorPayload
- type NodeDNSPublishAddressInput
- type NodeDNSPublishAddressPayload
- type NodeGroupPayload
- type NodeListenIPInput
- type NodeListenIPPayload
- type NodeMutationInput
- type NodePayload
- type NodePortRangeInput
- type NodePortRangePayload
- type NotificationChannelMutationInput
- type NotificationChannelPayload
- type OrganizationPayload
- type OrganizationUpdateInput
- type PortableRulePayload
- type PortableRuleUpstreamPayload
- type PortableTargetGroupMemberPayload
- type PortableTargetGroupPayload
- type PortableTargetPayload
- type RBACBackend
- type RegistrationTokenInput
- type RegistrationTokenPayload
- type ResourceOption
- type ResourceScopePayload
- type RoleMutationInput
- type RolePayload
- type RuleBatchInput
- type RuleBatchItemResult
- type RuleBatchResult
- type RuleConfig
- type RuleConnectInfoPayload
- type RuleCopyInput
- type RuleDeploymentNodePayload
- type RuleDeploymentPayload
- type RuleDiagnosticsPayload
- type RuleImportEntry
- type RuleImportInput
- type RuleImportIssue
- type RuleMatchInput
- type RuleMatchPayload
- type RuleMutationInput
- type RulePayload
- type RuleProxyProtocolInput
- type RuleTargetDiagnosticsPayload
- type RuleTrafficPayload
- type RuleUpstreamConfig
- type RuleUpstreamInput
- type RulesExportPayload
- type RulesImportResult
- type SessionBackend
- type SessionResult
- type TargetEndpoint
- type TargetGroupMemberInput
- type TargetGroupMemberPayload
- type TargetGroupMutationInput
- type TargetGroupPayload
- type TargetGroupSchedulerSupportFunc
- type TargetMutationInput
- type TargetPayload
- type TargetPriorityBucket
- type UserPayload
- type WebUserIdentity
Constants ¶
const ( MemberStatusActive = "ACTIVE" MemberStatusDisabled = "DISABLED" )
const ( FailurePolicyKeepEnabled = "KEEP_ENABLED" FailurePolicyDisableWhenAllNodesFailed = "DISABLE_WHEN_ALL_NODES_FAILED" RuleDeploymentAggregateDisabled = "DISABLED" RuleDeploymentStatusPending = "PENDING" RuleDeploymentStatusApplied = "APPLIED" RuleDeploymentStatusFailed = "FAILED" RuleDeploymentAggregateNoNodes = "NO_NODES" RuleDeploymentAggregateDeployFailed = "DEPLOY_FAILED" )
Variables ¶
var ErrConflict = errors.New("conflict")
var ErrForbidden = errors.New("forbidden")
var ErrInvalidInput = errors.New("invalid input")
var ErrNotFound = errors.New("not found")
var ErrQuotaExceeded = errors.New("quota exceeded")
Functions ¶
This section is empty.
Types ¶
type AgentAuthResult ¶
type AgentConfig ¶
type AgentConfig = agent.ConfigSnapshot
func EmptyNodeAgentConfig ¶
func EmptyNodeAgentConfig(nodeID string) AgentConfig
type AgentConfigCompiler ¶
type AgentConfigCompiler interface {
Compile(ctx context.Context, input AgentConfigInput) (AgentConfig, error)
}
type AgentConfigInput ¶
type AgentConfigInput struct {
NodeID string
NodeGroups []string
Rules []RuleConfig
}
type AgentHelloInput ¶
type AgentRuntimeMetricsInput ¶
type AgentRuntimeMetricsInput struct {
AgentID string
Status string
LastSeenAt string
Metrics agent.MetricsPayload
}
type AgentTrafficReportInput ¶ added in v0.1.18
type AgentTrafficReportInput struct {
ReportID string
Deltas []agent.RuleTrafficDelta
}
type AgentUpdatePolicyInput ¶
type AgentUpdatePolicyInput struct {
Enabled bool `json:"enabled"`
}
type AgentUpgradeBatchInput ¶
type AgentUpgradeBatchInput struct {
NodeIDs []string `json:"node_ids"`
}
type Authorizer ¶ added in v0.1.11
type Authorizer interface {
HasPermission(identity InternalIdentity, permission string) bool
AllowedNodeGroupIDs(identity InternalIdentity, requestedAccess string) map[string]bool
EnsureCanDelegateRoleScopes(ctx context.Context, repositories repo.Repositories, identity InternalIdentity, scopes []repo.ResourceScopeRecord) error
}
type BasicAgentConfigCompiler ¶
type BasicAgentConfigCompiler struct{}
func (BasicAgentConfigCompiler) Compile ¶
func (compiler BasicAgentConfigCompiler) Compile(ctx context.Context, input AgentConfigInput) (AgentConfig, error)
type BootstrapInput ¶
type ConfigApplyErrorInput ¶ added in v0.1.19
type ControlService ¶
type ControlService struct {
// contains filtered or unexported fields
}
func NewControlService ¶
func NewControlService(store repo.UnitOfWork) *ControlService
func NewControlServiceWithOptions ¶
func NewControlServiceWithOptions(store repo.UnitOfWork, options ControlServiceOptions) *ControlService
func (*ControlService) AcknowledgeMonitorAgentConfig ¶ added in v0.1.19
func (*ControlService) AcknowledgeNodeAgentConfig ¶
func (service *ControlService) AcknowledgeNodeAgentConfig(ctx context.Context, organizationID string, nodeID string, configVersion int, status string, errorMessage string, applyErrors []ConfigApplyErrorInput) error
func (*ControlService) AddMember ¶ added in v0.1.11
func (service *ControlService) AddMember(ctx context.Context, identity InternalIdentity, input MemberMutationInput) (MemberPayload, error)
func (*ControlService) AgentReleaseVersion ¶
func (service *ControlService) AgentReleaseVersion() string
func (*ControlService) AuthenticateAgentToken ¶
func (service *ControlService) AuthenticateAgentToken(ctx context.Context, agentType string, token string) (AgentAuthResult, error)
func (*ControlService) AuthorizeNodeMetricsStream ¶
func (service *ControlService) AuthorizeNodeMetricsStream(ctx context.Context, identity InternalIdentity, nodeID string) error
func (*ControlService) BatchRules ¶
func (service *ControlService) BatchRules(ctx context.Context, identity InternalIdentity, input RuleBatchInput) (RuleBatchResult, error)
func (*ControlService) Bootstrap ¶
func (service *ControlService) Bootstrap(ctx context.Context, identity WebUserIdentity, input BootstrapInput) (SessionResult, error)
func (*ControlService) CompileMonitorAgentConfig ¶ added in v0.1.19
func (service *ControlService) CompileMonitorAgentConfig(ctx context.Context, organizationID string, monitorID string) (agent.MonitorConfigSnapshot, error)
func (*ControlService) CompileNodeAgentConfig ¶
func (service *ControlService) CompileNodeAgentConfig(ctx context.Context, organizationID string, nodeID string) (AgentConfig, error)
func (*ControlService) CopyRule ¶
func (service *ControlService) CopyRule(ctx context.Context, identity InternalIdentity, ruleID string, input RuleCopyInput) (RulePayload, error)
func (*ControlService) CreateDNSCredential ¶ added in v0.1.19
func (service *ControlService) CreateDNSCredential(ctx context.Context, identity InternalIdentity, input DNSCredentialMutationInput) (DNSCredentialPayload, error)
func (*ControlService) CreateDNSInstance ¶ added in v0.1.20
func (service *ControlService) CreateDNSInstance(ctx context.Context, identity InternalIdentity, input DNSInstanceMutationInput) (DNSInstancePayload, error)
func (*ControlService) CreateDNSManagedRecord ¶ added in v0.1.20
func (service *ControlService) CreateDNSManagedRecord(ctx context.Context, identity InternalIdentity, input DNSManagedRecordMutationInput) (DNSManagedRecordPayload, error)
func (*ControlService) CreateHealthCheck ¶ added in v0.1.19
func (service *ControlService) CreateHealthCheck(ctx context.Context, identity InternalIdentity, input HealthCheckMutationInput) (HealthCheckPayload, error)
func (*ControlService) CreateHealthEvaluationRule ¶ added in v0.1.19
func (service *ControlService) CreateHealthEvaluationRule(ctx context.Context, identity InternalIdentity, input HealthEvaluationRuleMutationInput) (HealthEvaluationRulePayload, error)
func (*ControlService) CreateMonitor ¶
func (service *ControlService) CreateMonitor(ctx context.Context, identity InternalIdentity, input MonitorMutationInput) (MonitorPayload, error)
func (*ControlService) CreateMonitorGroup ¶
func (service *ControlService) CreateMonitorGroup(ctx context.Context, identity InternalIdentity, input GroupMutationInput) (MonitorGroupPayload, error)
func (*ControlService) CreateNode ¶
func (service *ControlService) CreateNode(ctx context.Context, identity InternalIdentity, input NodeMutationInput) (NodePayload, error)
func (*ControlService) CreateNodeGroup ¶
func (service *ControlService) CreateNodeGroup(ctx context.Context, identity InternalIdentity, input GroupMutationInput) (NodeGroupPayload, error)
func (*ControlService) CreateNotificationChannel ¶ added in v0.1.20
func (service *ControlService) CreateNotificationChannel(ctx context.Context, identity InternalIdentity, input NotificationChannelMutationInput) (NotificationChannelPayload, error)
func (*ControlService) CreateRegistrationToken ¶
func (service *ControlService) CreateRegistrationToken(ctx context.Context, identity InternalIdentity, agentType string, agentID string, input RegistrationTokenInput) (RegistrationTokenPayload, error)
func (*ControlService) CreateRole ¶ added in v0.1.11
func (service *ControlService) CreateRole(ctx context.Context, identity InternalIdentity, input RoleMutationInput) (RolePayload, error)
func (*ControlService) CreateRule ¶
func (service *ControlService) CreateRule(ctx context.Context, identity InternalIdentity, input RuleMutationInput) (RulePayload, error)
func (*ControlService) CreateTarget ¶
func (service *ControlService) CreateTarget(ctx context.Context, identity InternalIdentity, input TargetMutationInput) (TargetPayload, error)
func (*ControlService) CreateTargetGroup ¶
func (service *ControlService) CreateTargetGroup(ctx context.Context, identity InternalIdentity, input TargetGroupMutationInput) (TargetGroupPayload, error)
func (*ControlService) DeleteDNSCredential ¶ added in v0.1.19
func (service *ControlService) DeleteDNSCredential(ctx context.Context, identity InternalIdentity, credentialID string) error
func (*ControlService) DeleteDNSInstance ¶ added in v0.1.20
func (service *ControlService) DeleteDNSInstance(ctx context.Context, identity InternalIdentity, instanceID string) error
func (*ControlService) DeleteDNSManagedRecord ¶ added in v0.1.20
func (service *ControlService) DeleteDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string) error
func (*ControlService) DeleteHealthCheck ¶ added in v0.1.19
func (service *ControlService) DeleteHealthCheck(ctx context.Context, identity InternalIdentity, healthCheckID string) error
func (*ControlService) DeleteMember ¶ added in v0.1.11
func (service *ControlService) DeleteMember(ctx context.Context, identity InternalIdentity, memberID string) error
func (*ControlService) DeleteMonitor ¶
func (service *ControlService) DeleteMonitor(ctx context.Context, identity InternalIdentity, monitorID string) error
func (*ControlService) DeleteMonitorGroup ¶
func (service *ControlService) DeleteMonitorGroup(ctx context.Context, identity InternalIdentity, monitorGroupID string) error
func (*ControlService) DeleteNode ¶
func (service *ControlService) DeleteNode(ctx context.Context, identity InternalIdentity, nodeID string) error
func (*ControlService) DeleteNodeGroup ¶
func (service *ControlService) DeleteNodeGroup(ctx context.Context, identity InternalIdentity, nodeGroupID string) error
func (*ControlService) DeleteNotificationChannel ¶ added in v0.1.20
func (service *ControlService) DeleteNotificationChannel(ctx context.Context, identity InternalIdentity, channelID string) error
func (*ControlService) DeleteRole ¶ added in v0.1.11
func (service *ControlService) DeleteRole(ctx context.Context, identity InternalIdentity, roleID string) error
func (*ControlService) DeleteRule ¶
func (service *ControlService) DeleteRule(ctx context.Context, identity InternalIdentity, ruleID string) error
func (*ControlService) DeleteTarget ¶
func (service *ControlService) DeleteTarget(ctx context.Context, identity InternalIdentity, targetID string) error
func (*ControlService) DeleteTargetGroup ¶
func (service *ControlService) DeleteTargetGroup(ctx context.Context, identity InternalIdentity, targetGroupID string) error
func (*ControlService) DisableRule ¶
func (service *ControlService) DisableRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
func (*ControlService) EnableRule ¶
func (service *ControlService) EnableRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
func (*ControlService) EvaluateDNSManagedRecord ¶ added in v0.1.20
func (service *ControlService) EvaluateDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string) (DNSManagedRecordPayload, error)
func (*ControlService) ExportRules ¶
func (service *ControlService) ExportRules(ctx context.Context, identity InternalIdentity, ruleIDs []string) (RulesExportPayload, error)
func (*ControlService) FinalizeAgentRegistrationDelivery ¶
func (service *ControlService) FinalizeAgentRegistrationDelivery(ctx context.Context, authResult AgentAuthResult) error
func (*ControlService) GetMonitor ¶
func (service *ControlService) GetMonitor(ctx context.Context, identity InternalIdentity, monitorID string) (MonitorPayload, error)
func (*ControlService) GetNode ¶
func (service *ControlService) GetNode(ctx context.Context, identity InternalIdentity, nodeID string) (NodePayload, error)
func (*ControlService) GetRule ¶
func (service *ControlService) GetRule(ctx context.Context, identity InternalIdentity, ruleID string) (RulePayload, error)
func (*ControlService) ImportRules ¶
func (service *ControlService) ImportRules(ctx context.Context, identity InternalIdentity, input RuleImportInput) (RulesImportResult, error)
func (*ControlService) ListDNSCredentials ¶ added in v0.1.19
func (service *ControlService) ListDNSCredentials(ctx context.Context, identity InternalIdentity) ([]DNSCredentialPayload, error)
func (*ControlService) ListDNSInstances ¶ added in v0.1.20
func (service *ControlService) ListDNSInstances(ctx context.Context, identity InternalIdentity) ([]DNSInstancePayload, error)
func (*ControlService) ListDNSManagedRecords ¶ added in v0.1.20
func (service *ControlService) ListDNSManagedRecords(ctx context.Context, identity InternalIdentity) ([]DNSManagedRecordPayload, error)
func (*ControlService) ListHealthChecks ¶ added in v0.1.19
func (service *ControlService) ListHealthChecks(ctx context.Context, identity InternalIdentity) ([]HealthCheckPayload, error)
func (*ControlService) ListHealthResults ¶ added in v0.1.19
func (service *ControlService) ListHealthResults(ctx context.Context, identity InternalIdentity, healthCheckID string) ([]HealthResultPayload, error)
func (*ControlService) ListMembers ¶ added in v0.1.11
func (service *ControlService) ListMembers(ctx context.Context, identity InternalIdentity) ([]MemberPayload, error)
func (*ControlService) ListMonitorGroups ¶
func (service *ControlService) ListMonitorGroups(ctx context.Context, identity InternalIdentity) ([]MonitorGroupPayload, error)
func (*ControlService) ListMonitors ¶
func (service *ControlService) ListMonitors(ctx context.Context, identity InternalIdentity) ([]MonitorPayload, error)
func (*ControlService) ListNodeGroupOptions ¶
func (service *ControlService) ListNodeGroupOptions(ctx context.Context, identity InternalIdentity, accessLevel string) ([]ResourceOption, error)
func (*ControlService) ListNodeGroups ¶
func (service *ControlService) ListNodeGroups(ctx context.Context, identity InternalIdentity) ([]NodeGroupPayload, error)
func (*ControlService) ListNodes ¶
func (service *ControlService) ListNodes(ctx context.Context, identity InternalIdentity) ([]NodePayload, error)
func (*ControlService) ListNotificationChannels ¶ added in v0.1.20
func (service *ControlService) ListNotificationChannels(ctx context.Context, identity InternalIdentity) ([]NotificationChannelPayload, error)
func (*ControlService) ListRegistrationTokens ¶
func (service *ControlService) ListRegistrationTokens(ctx context.Context, identity InternalIdentity, agentType string, agentID string) ([]RegistrationTokenPayload, error)
func (*ControlService) ListRoles ¶ added in v0.1.11
func (service *ControlService) ListRoles(ctx context.Context, identity InternalIdentity) ([]RolePayload, error)
func (*ControlService) ListRules ¶
func (service *ControlService) ListRules(ctx context.Context, identity InternalIdentity) ([]RulePayload, error)
func (*ControlService) ListTargetGroups ¶
func (service *ControlService) ListTargetGroups(ctx context.Context, identity InternalIdentity) ([]TargetGroupPayload, error)
func (*ControlService) ListTargets ¶
func (service *ControlService) ListTargets(ctx context.Context, identity InternalIdentity) ([]TargetPayload, error)
func (*ControlService) MarkMonitorAgentConnected ¶
func (*ControlService) MarkMonitorAgentDisconnected ¶
func (*ControlService) MarkNodeAgentConnected ¶
func (*ControlService) MarkNodeAgentConnectedFromRemote ¶ added in v0.1.20
func (*ControlService) MarkNodeAgentDisconnected ¶
func (*ControlService) NodeAgentConfigBehind ¶
func (*ControlService) NodeGroupListenIPOptions ¶
func (service *ControlService) NodeGroupListenIPOptions(ctx context.Context, identity InternalIdentity, nodeGroupID string, protocol string, port int) ([]ResourceOption, error)
func (*ControlService) PendingNodeAgentUpdate ¶
func (*ControlService) RecordMonitorHealthResults ¶ added in v0.1.19
func (service *ControlService) RecordMonitorHealthResults(ctx context.Context, organizationID string, monitorID string, results []HealthResultInput) error
func (*ControlService) RecordNodeAgentHello ¶
func (service *ControlService) RecordNodeAgentHello(ctx context.Context, organizationID string, nodeID string, input AgentHelloInput) (NodePayload, bool, error)
func (*ControlService) RecordNodeAgentUpdateResult ¶
func (*ControlService) RecordNodeTrafficReport ¶ added in v0.1.18
func (service *ControlService) RecordNodeTrafficReport(ctx context.Context, organizationID string, nodeID string, input AgentTrafficReportInput) (bool, error)
func (*ControlService) RefreshDNSCredentialZones ¶ added in v0.1.20
func (service *ControlService) RefreshDNSCredentialZones(ctx context.Context, identity InternalIdentity, credentialID string) (DNSCredentialPayload, error)
func (*ControlService) ReleaseAgentRegistrationCredential ¶
func (service *ControlService) ReleaseAgentRegistrationCredential(ctx context.Context, authResult AgentAuthResult) error
func (*ControlService) RequestNodeAgentUpgrade ¶
func (service *ControlService) RequestNodeAgentUpgrade(ctx context.Context, identity InternalIdentity, nodeID string) (NodePayload, error)
func (*ControlService) RequestNodeAgentUpgrades ¶
func (service *ControlService) RequestNodeAgentUpgrades(ctx context.Context, identity InternalIdentity, input AgentUpgradeBatchInput) ([]NodePayload, error)
func (*ControlService) RevokeRegistrationToken ¶
func (service *ControlService) RevokeRegistrationToken(ctx context.Context, identity InternalIdentity, agentType string, agentID string, tokenID string) error
func (*ControlService) RuleDiagnostics ¶
func (service *ControlService) RuleDiagnostics(ctx context.Context, identity InternalIdentity, ruleID string, runtimeStates []AgentRuntimeMetricsInput) (RuleDiagnosticsPayload, error)
func (*ControlService) RuleTraffic ¶
func (service *ControlService) RuleTraffic(ctx context.Context, identity InternalIdentity, ruleID string) (RuleTrafficPayload, error)
func (*ControlService) SessionForInternalIdentity ¶
func (service *ControlService) SessionForInternalIdentity(ctx context.Context, identity InternalIdentity) (SessionResult, error)
func (*ControlService) SessionForWebUser ¶
func (service *ControlService) SessionForWebUser(ctx context.Context, identity WebUserIdentity) (SessionResult, error)
func (*ControlService) SupportedHealthActionTypes ¶ added in v0.1.19
func (service *ControlService) SupportedHealthActionTypes() []string
SupportedHealthActionTypes reports health action types available in this control service.
func (*ControlService) TargetGroupOptions ¶
func (service *ControlService) TargetGroupOptions(ctx context.Context, identity InternalIdentity, protocol string) ([]ResourceOption, error)
func (*ControlService) TargetOptions ¶
func (service *ControlService) TargetOptions(ctx context.Context, identity InternalIdentity, protocol string) ([]ResourceOption, error)
func (*ControlService) UpdateDNSCredential ¶ added in v0.1.19
func (service *ControlService) UpdateDNSCredential(ctx context.Context, identity InternalIdentity, credentialID string, input DNSCredentialMutationInput) (DNSCredentialPayload, error)
func (*ControlService) UpdateDNSInstance ¶ added in v0.1.20
func (service *ControlService) UpdateDNSInstance(ctx context.Context, identity InternalIdentity, instanceID string, input DNSInstanceMutationInput) (DNSInstancePayload, error)
func (*ControlService) UpdateDNSManagedRecord ¶ added in v0.1.20
func (service *ControlService) UpdateDNSManagedRecord(ctx context.Context, identity InternalIdentity, recordID string, input DNSManagedRecordMutationInput) (DNSManagedRecordPayload, error)
func (*ControlService) UpdateHealthCheck ¶ added in v0.1.19
func (service *ControlService) UpdateHealthCheck(ctx context.Context, identity InternalIdentity, healthCheckID string, input HealthCheckMutationInput) (HealthCheckPayload, error)
func (*ControlService) UpdateMember ¶ added in v0.1.11
func (service *ControlService) UpdateMember(ctx context.Context, identity InternalIdentity, memberID string, input MemberMutationInput) (MemberPayload, error)
func (*ControlService) UpdateMonitor ¶
func (service *ControlService) UpdateMonitor(ctx context.Context, identity InternalIdentity, monitorID string, input MonitorMutationInput) (MonitorPayload, error)
func (*ControlService) UpdateMonitorGroup ¶
func (service *ControlService) UpdateMonitorGroup(ctx context.Context, identity InternalIdentity, monitorGroupID string, input GroupMutationInput) (MonitorGroupPayload, error)
func (*ControlService) UpdateNode ¶
func (service *ControlService) UpdateNode(ctx context.Context, identity InternalIdentity, nodeID string, input NodeMutationInput) (NodePayload, error)
func (*ControlService) UpdateNodeAgentUpdatePolicy ¶
func (service *ControlService) UpdateNodeAgentUpdatePolicy(ctx context.Context, identity InternalIdentity, nodeID string, input AgentUpdatePolicyInput) (NodePayload, error)
func (*ControlService) UpdateNodeGroup ¶
func (service *ControlService) UpdateNodeGroup(ctx context.Context, identity InternalIdentity, nodeGroupID string, input GroupMutationInput) (NodeGroupPayload, error)
func (*ControlService) UpdateNotificationChannel ¶ added in v0.1.20
func (service *ControlService) UpdateNotificationChannel(ctx context.Context, identity InternalIdentity, channelID string, input NotificationChannelMutationInput) (NotificationChannelPayload, error)
func (*ControlService) UpdateOrganization ¶
func (service *ControlService) UpdateOrganization(ctx context.Context, identity InternalIdentity, input OrganizationUpdateInput) (OrganizationPayload, error)
func (*ControlService) UpdateRole ¶ added in v0.1.11
func (service *ControlService) UpdateRole(ctx context.Context, identity InternalIdentity, roleID string, input RoleMutationInput) (RolePayload, error)
func (*ControlService) UpdateRule ¶
func (service *ControlService) UpdateRule(ctx context.Context, identity InternalIdentity, ruleID string, input RuleMutationInput) (RulePayload, error)
func (*ControlService) UpdateTarget ¶
func (service *ControlService) UpdateTarget(ctx context.Context, identity InternalIdentity, targetID string, input TargetMutationInput) (TargetPayload, error)
func (*ControlService) UpdateTargetGroup ¶
func (service *ControlService) UpdateTargetGroup(ctx context.Context, identity InternalIdentity, targetGroupID string, input TargetGroupMutationInput) (TargetGroupPayload, error)
func (*ControlService) ValidateAgentToken ¶
func (service *ControlService) ValidateAgentToken(ctx context.Context, agentType string, token string) (AgentAuthResult, error)
type ControlServiceOptions ¶
type ControlServiceOptions struct {
AppName string
ControlPlaneURL string
AgentReleaseVersion string
AgentTokenSigningSecret []byte
Edition edition.Provider
Authorizer Authorizer
SessionBackend SessionBackend
RBACBackend RBACBackend
TargetGroupSchedulers TargetGroupSchedulerSupportFunc
DNSSecretEncryptionKey string
DNSProviders dns.ProviderRegistry
HealthActionExecutors []HealthActionExecutor
HealthEventExecutors []HealthEventExecutor
}
type DNSCredentialMutationInput ¶ added in v0.1.19
type DNSCredentialPayload ¶ added in v0.1.19
type DNSCredentialPayload struct {
ID string `json:"id"`
Name string `json:"name"`
Provider string `json:"provider"`
Zones []DNSCredentialZonePayload `json:"zones"`
}
type DNSCredentialZonePayload ¶ added in v0.1.20
type DNSDiagnosticPayload ¶ added in v0.1.20
type DNSInstanceMutationInput ¶ added in v0.1.20
type DNSInstancePayload ¶ added in v0.1.20
type DNSInstancePayload struct {
ID string `json:"id"`
ManagedRecordID string `json:"managed_record_id"`
Name string `json:"name"`
Priority int `json:"priority"`
Enabled bool `json:"enabled"`
NodeGroupIDs []string `json:"node_group_ids"`
AnswerCount int `json:"answer_count"`
Condition map[string]any `json:"condition"`
Action map[string]any `json:"action"`
NotificationChannelIDs []string `json:"notification_channel_ids"`
LastOutputValues []string `json:"last_output_values"`
LastStatus string `json:"last_status"`
LastDiagnostics []DNSDiagnosticPayload `json:"last_diagnostics"`
LastEvaluatedAt string `json:"last_evaluated_at,omitempty"`
}
type DNSManagedRecordMutationInput ¶ added in v0.1.20
type DNSManagedRecordPayload ¶ added in v0.1.20
type DNSManagedRecordPayload struct {
ID string `json:"id"`
DNSCredentialID string `json:"dns_credential_id"`
CredentialZoneID string `json:"credential_zone_id"`
ZoneID string `json:"zone_id"`
ZoneName string `json:"zone_name"`
RecordHost string `json:"record_host"`
RecordName string `json:"record_name"`
RecordType string `json:"record_type"`
TTL int `json:"ttl"`
Proxied bool `json:"proxied"`
ActiveInstanceID string `json:"active_instance_id,omitempty"`
LastAppliedValues []string `json:"last_applied_values"`
LastEvaluationStatus string `json:"last_evaluation_status"`
LastEvaluationError string `json:"last_evaluation_error,omitempty"`
LastDiagnostics []DNSDiagnosticPayload `json:"last_diagnostics"`
LastEvaluatedAt string `json:"last_evaluated_at,omitempty"`
LastAppliedAt string `json:"last_applied_at,omitempty"`
Instances []DNSInstancePayload `json:"instances"`
}
type ErrorPayload ¶
type ErrorPayload struct {
Code string `json:"code"`
Message string `json:"message"`
Details map[string]any `json:"details,omitempty"`
}
func ErrorPayloadForError ¶
func ErrorPayloadForError(err error) ErrorPayload
type GroupMutationInput ¶
type HealthActionExecutionInput ¶ added in v0.1.19
type HealthActionExecutionInput struct {
OrganizationID string
HealthCheck repo.HealthCheckRecord
Rule repo.HealthEvaluationRuleRecord
Event repo.HealthEventRecord
Result repo.HealthResultRecord
Results []repo.HealthResultRecord
}
HealthActionExecutor is the extension point for side effects triggered by health evaluation rules. DNS failover is the OSS default action; webhook, email, and other action types can register here without changing monitor result ingestion.
type HealthActionExecutor ¶ added in v0.1.19
type HealthActionRegistry ¶ added in v0.1.19
type HealthActionRegistry struct {
// contains filtered or unexported fields
}
HealthActionRegistry owns the extension boundary between health evaluation and action side effects.
func NewHealthActionRegistry ¶ added in v0.1.19
func NewHealthActionRegistry(executors ...HealthActionExecutor) HealthActionRegistry
NewHealthActionRegistry builds an ordered health action registry.
func (HealthActionRegistry) ExecutorForType ¶ added in v0.1.19
func (registry HealthActionRegistry) ExecutorForType(eventType string) HealthActionExecutor
ExecutorForType returns the first executor that supports the normalized event type.
func (*HealthActionRegistry) Register ¶ added in v0.1.19
func (registry *HealthActionRegistry) Register(executor HealthActionExecutor)
Register appends an executor to the registry. Earlier executors win when multiple support a type.
func (HealthActionRegistry) SupportedHealthActionTypes ¶ added in v0.1.19
func (registry HealthActionRegistry) SupportedHealthActionTypes() []string
SupportedHealthActionTypes reports the stable set of advertised action types.
type HealthActionTypesProvider ¶ added in v0.1.19
type HealthActionTypesProvider interface {
HealthActionTypes() []string
}
HealthActionTypesProvider lets action executors advertise concrete event types for API/UI capability discovery without coupling health evaluation to the event implementation.
type HealthCheckMutationInput ¶ added in v0.1.19
type HealthCheckMutationInput struct {
Name string
ProbeType string
IntervalSeconds int
TimeoutSeconds int
Enabled bool
TargetScope HealthTargetScopeInput
MonitorScope HealthMonitorScopeInput
ConfigJSON string
}
type HealthCheckPayload ¶ added in v0.1.19
type HealthCheckPayload struct {
ID string `json:"id"`
Name string `json:"name"`
ProbeType string `json:"probe_type"`
IntervalSeconds int `json:"interval_seconds"`
TimeoutSeconds int `json:"timeout_seconds"`
Config map[string]any `json:"config"`
Enabled bool `json:"enabled"`
TargetScope HealthTargetScopePayload `json:"target_scope"`
Targets []HealthCheckTargetPayload `json:"targets"`
MonitorScopes []HealthMonitorScopePayload `json:"monitor_scopes"`
LatestResults []HealthResultPayload `json:"latest_results"`
}
type HealthCheckTargetPayload ¶ added in v0.1.19
type HealthCheckTargetPayload struct {
ID string `json:"id"`
ScopeType string `json:"scope_type"`
TargetID string `json:"target_id"`
TargetGroupID string `json:"target_group_id,omitempty"`
TargetName string `json:"target_name"`
TargetHost string `json:"target_host"`
TargetPort int `json:"target_port"`
}
type HealthEvaluationRuleMutationInput ¶ added in v0.1.19
type HealthEvaluationRuleMutationInput struct {
HealthCheckID string
Name string
Enabled bool
ExpressionJSON string
Events []HealthEventMutationInput
}
type HealthEvaluationRulePayload ¶ added in v0.1.19
type HealthEvaluationRulePayload struct {
ID string `json:"id"`
HealthCheckID string `json:"health_check_id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
ExpressionJSON string `json:"expression_json"`
Events []HealthEventPayload `json:"events"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type HealthEventExecutionInput ¶ added in v0.1.19
type HealthEventExecutionInput = HealthActionExecutionInput
type HealthEventExecutor ¶ added in v0.1.19
type HealthEventExecutor = HealthActionExecutor
type HealthEventMutationInput ¶ added in v0.1.19
type HealthEventPayload ¶ added in v0.1.19
type HealthMonitorScopeInput ¶ added in v0.1.19
type HealthMonitorScopePayload ¶ added in v0.1.19
type HealthResultInput ¶ added in v0.1.19
type HealthResultPayload ¶ added in v0.1.19
type HealthResultPayload struct {
ID string `json:"id"`
HealthCheckID string `json:"health_check_id"`
HealthCheckTargetID string `json:"health_check_target_id"`
MonitorID string `json:"monitor_id"`
TargetID string `json:"target_id"`
Status string `json:"status"`
LatencyMS int `json:"latency_ms"`
ErrorMessage string `json:"error_message,omitempty"`
ObservedAt string `json:"observed_at"`
CreatedAt string `json:"created_at"`
}
type HealthTargetScopeInput ¶ added in v0.1.19
type HealthTargetScopePayload ¶ added in v0.1.20
type InternalIdentity ¶
type MemberMutationInput ¶
type MemberPayload ¶
type MonitorGroupPayload ¶
type MonitorMutationInput ¶
type MonitorPayload ¶
type MonitorPayload struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
DesiredConfigVersion int `json:"desired_config_version"`
AppliedConfigVersion int `json:"applied_config_version"`
LastSeenAt string `json:"last_seen_at,omitempty"`
RegisteredAt string `json:"registered_at,omitempty"`
GroupIDs []string `json:"group_ids"`
}
type NodeDNSPublishAddressInput ¶ added in v0.1.20
type NodeDNSPublishAddressPayload ¶ added in v0.1.20
type NodeGroupPayload ¶
type NodeListenIPInput ¶
type NodeListenIPPayload ¶
type NodeMutationInput ¶
type NodeMutationInput struct {
Name string
NameProvided bool
GroupIDs []string
GroupIDsProvided bool
ListenIPs []NodeListenIPInput
ListenIPsProvided bool
PortRanges []NodePortRangeInput
PortRangesProvided bool
DNSPublishAddresses []NodeDNSPublishAddressInput
DNSPublishAddressesProvided bool
PublicDescription string
PublicDescriptionProvided bool
}
type NodePayload ¶
type NodePayload struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
PublicDescription string `json:"public_description"`
DesiredConfigVersion int `json:"desired_config_version"`
AppliedConfigVersion int `json:"applied_config_version"`
ConfigStatus string `json:"config_status"`
ConfigErrorMessage string `json:"config_error_message,omitempty"`
ConfigStatusUpdatedAt string `json:"config_status_updated_at,omitempty"`
LastSeenAt string `json:"last_seen_at,omitempty"`
RegisteredAt string `json:"registered_at,omitempty"`
AgentVersion string `json:"agent_version"`
AgentCommit string `json:"agent_commit"`
AgentBuildTime string `json:"agent_build_time"`
AgentAutoUpdateEnabled bool `json:"agent_auto_update_enabled"`
DesiredAgentVersion string `json:"desired_agent_version"`
AgentUpdateStatus string `json:"agent_update_status"`
AgentUpdateError string `json:"agent_update_error,omitempty"`
AgentUpdateStartedAt string `json:"agent_update_started_at,omitempty"`
AgentUpdateFinishedAt string `json:"agent_update_finished_at,omitempty"`
GroupIDs []string `json:"group_ids"`
ListenIPs []NodeListenIPPayload `json:"listen_ips"`
PortRanges []NodePortRangePayload `json:"port_ranges"`
DNSPublishAddresses []NodeDNSPublishAddressPayload `json:"dns_publish_addresses"`
}
type NodePortRangeInput ¶
type NodePortRangePayload ¶
type NotificationChannelMutationInput ¶ added in v0.1.20
type NotificationChannelPayload ¶ added in v0.1.20
type OrganizationPayload ¶
type OrganizationUpdateInput ¶
type PortableRulePayload ¶
type PortableRulePayload struct {
Name string `json:"name"`
Tags []string `json:"tags"`
FailurePolicy string `json:"failure_policy,omitempty"`
ForwardingType string `json:"forwarding_type"`
Protocol string `json:"protocol"`
Port int `json:"port"`
Match RuleMatchPayload `json:"match"`
ProxyProtocol RuleProxyProtocolInput `json:"proxy_protocol"`
Upstream PortableRuleUpstreamPayload `json:"upstream"`
}
type PortableTargetGroupPayload ¶
type PortableTargetGroupPayload struct {
Ref string `json:"ref"`
Name string `json:"name"`
Description string `json:"description"`
Scheduler string `json:"scheduler"`
Members []PortableTargetGroupMemberPayload `json:"members"`
}
type PortableTargetPayload ¶
type RBACBackend ¶ added in v0.1.11
type RBACBackend interface {
ListMembers(ctx context.Context, identity InternalIdentity) ([]MemberPayload, error)
AddMember(ctx context.Context, identity InternalIdentity, input MemberMutationInput) (MemberPayload, error)
UpdateMember(ctx context.Context, identity InternalIdentity, memberID string, input MemberMutationInput) (MemberPayload, error)
DeleteMember(ctx context.Context, identity InternalIdentity, memberID string) error
ListRoles(ctx context.Context, identity InternalIdentity) ([]RolePayload, error)
CreateRole(ctx context.Context, identity InternalIdentity, input RoleMutationInput) (RolePayload, error)
UpdateRole(ctx context.Context, identity InternalIdentity, roleID string, input RoleMutationInput) (RolePayload, error)
DeleteRole(ctx context.Context, identity InternalIdentity, roleID string) error
}
type RegistrationTokenInput ¶
type RegistrationTokenInput struct {
TTLHours int
}
type RegistrationTokenPayload ¶
type RegistrationTokenPayload struct {
TokenID string `json:"token_id"`
Token string `json:"token,omitempty"`
AgentType string `json:"agent_type"`
AgentID string `json:"agent_id"`
ExpiresAt string `json:"expires_at"`
UsedAt string `json:"used_at,omitempty"`
RevokedAt string `json:"revoked_at,omitempty"`
CreatedAt string `json:"created_at"`
CreatedByUserID string `json:"created_by_user_id,omitempty"`
InstallCommand string `json:"install_command,omitempty"`
}
type ResourceOption ¶
type ResourceScopePayload ¶
type RoleMutationInput ¶
type RoleMutationInput struct {
Name string
Description string
Permissions []string
ResourceScopes []ResourceScopePayload
}
type RolePayload ¶
type RuleBatchInput ¶
type RuleBatchItemResult ¶
type RuleBatchItemResult struct {
RuleID string `json:"rule_id"`
Status string `json:"status"`
Error *ErrorPayload `json:"error,omitempty"`
Warning string `json:"warning,omitempty"`
}
type RuleBatchResult ¶
type RuleBatchResult struct {
Action string `json:"action"`
Total int `json:"total"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Results []RuleBatchItemResult `json:"results"`
}
type RuleConfig ¶
type RuleConfig = agent.RuleConfig
type RuleConnectInfoPayload ¶
type RuleCopyInput ¶
type RuleDeploymentNodePayload ¶ added in v0.1.19
type RuleDeploymentNodePayload struct {
NodeID string `json:"node_id"`
NodeName string `json:"node_name"`
Status string `json:"status"`
ErrorCode string `json:"error_code,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
Protocol string `json:"protocol,omitempty"`
ListenIP string `json:"listen_ip,omitempty"`
Port int `json:"port,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
type RuleDeploymentPayload ¶ added in v0.1.19
type RuleDiagnosticsPayload ¶
type RuleImportEntry ¶
type RuleImportInput ¶
type RuleImportInput struct {
DryRun bool
Entry RuleImportEntry
Format string
SourceText string
}
type RuleImportIssue ¶
type RuleMatchInput ¶
type RuleMatchPayload ¶
type RuleMutationInput ¶
type RuleMutationInput struct {
Name string
Tags []string
NodeGroupID string
ListenIP string
FailurePolicy string
ForwardingType string
Protocol string
Port int
Match RuleMatchInput
ProxyProtocol RuleProxyProtocolInput
Upstream RuleUpstreamInput
Enabled bool
EnabledSet bool
}
type RulePayload ¶
type RulePayload struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Enabled bool `json:"enabled"`
Tags []string `json:"tags"`
NodeGroupID string `json:"node_group_id"`
ListenIP string `json:"listen_ip"`
FailurePolicy string `json:"failure_policy"`
ForwardingType string `json:"forwarding_type"`
Protocol string `json:"protocol"`
Port int `json:"port"`
Match RuleMatchPayload `json:"match"`
ProxyProtocol RuleProxyProtocolInput `json:"proxy_protocol"`
Upstream RuleUpstreamInput `json:"upstream"`
OwnerUserID string `json:"owner_user_id"`
ConfigVersion int `json:"config_version"`
ConnectInfo RuleConnectInfoPayload `json:"connect_info"`
Deployment RuleDeploymentPayload `json:"deployment"`
}
type RuleProxyProtocolInput ¶
type RuleTargetDiagnosticsPayload ¶
type RuleTargetDiagnosticsPayload struct {
TargetID string `json:"target_id"`
Name string `json:"name"`
Address string `json:"address"`
Status string `json:"status"`
LastSeenAt string `json:"last_seen_at,omitempty"`
LatencyMS *int64 `json:"latency_ms"`
BandwidthBps *int64 `json:"bandwidth_bps"`
UploadBytes int64 `json:"upload_bytes"`
DownloadBytes int64 `json:"download_bytes"`
TCPConnections int64 `json:"tcp_connections"`
UDPPacketsPerSecond int64 `json:"udp_packets_per_second"`
}
type RuleTrafficPayload ¶
type RuleUpstreamConfig ¶
type RuleUpstreamConfig = agent.RuleUpstreamConfig
type RuleUpstreamInput ¶
type RulesExportPayload ¶
type RulesExportPayload struct {
SchemaVersion string `json:"schema_version"`
ExportedAt string `json:"exported_at"`
Rules []PortableRulePayload `json:"rules"`
Targets []PortableTargetPayload `json:"targets"`
TargetGroups []PortableTargetGroupPayload `json:"target_groups"`
}
type RulesImportResult ¶
type RulesImportResult struct {
DryRun bool `json:"dry_run"`
Created int `json:"created"`
Skipped int `json:"skipped"`
Errors []RuleImportIssue `json:"errors"`
Warnings []RuleImportIssue `json:"warnings"`
}
type SessionBackend ¶ added in v0.1.11
type SessionBackend interface {
Bootstrap(ctx context.Context, identity WebUserIdentity, input BootstrapInput) (SessionResult, error)
SessionForWebUser(ctx context.Context, identity WebUserIdentity) (SessionResult, error)
SessionForInternalIdentity(ctx context.Context, identity InternalIdentity) (SessionResult, error)
}
type SessionResult ¶
type SessionResult struct {
Created bool `json:"created"`
User UserPayload `json:"user"`
Organization OrganizationPayload `json:"organization"`
Organizations []OrganizationPayload `json:"organizations"`
Member MemberPayload `json:"member"`
Roles []RolePayload `json:"roles"`
Permissions []string `json:"permissions"`
ResourceScopes []ResourceScopePayload `json:"resource_scopes"`
}
type TargetEndpoint ¶
type TargetEndpoint = agent.TargetEndpoint
type TargetGroupMemberInput ¶
type TargetGroupMutationInput ¶
type TargetGroupMutationInput struct {
Name string
Description string
Scheduler string
Members []TargetGroupMemberInput
}
type TargetGroupPayload ¶
type TargetGroupPayload struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Scheduler string `json:"scheduler"`
Members []TargetGroupMemberPayload `json:"members"`
}
type TargetGroupSchedulerSupportFunc ¶ added in v0.1.15
type TargetMutationInput ¶
type TargetPayload ¶
type TargetPriorityBucket ¶
type TargetPriorityBucket = agent.TargetPriorityBucket
type UserPayload ¶
type WebUserIdentity ¶
Source Files
¶
- config_compiler.go
- control.go
- control_agent_auth.go
- control_agent_config.go
- control_authorizer.go
- control_authorizer_oss.go
- control_dns_credentials.go
- control_dns_policy.go
- control_dns_policy_cleanup.go
- control_dns_policy_evaluation.go
- control_dns_policy_helpers.go
- control_dns_policy_payloads.go
- control_dns_policy_provider.go
- control_dns_policy_runtime.go
- control_errors.go
- control_extensions.go
- control_health_actions.go
- control_health_dns.go
- control_health_dns_payloads.go
- control_health_notification_executor.go
- control_health_scope.go
- control_health_time.go
- control_nodes.go
- control_nodes_options.go
- control_nodes_options_oss.go
- control_notification_channels.go
- control_rbac.go
- control_rule_deployment.go
- control_rule_diagnostics.go
- control_rule_helpers.go
- control_rule_import_service.go
- control_rule_imports.go
- control_rule_traffic.go
- control_rules.go
- control_session_oss.go
- control_single_user_session.go
- control_targets.go
- control_types.go
- health_event_executor.go