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 ControlService
- 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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 ErrorPayload
- type GroupMutationInput
- type InternalIdentity
- type MemberMutationInput
- type MemberPayload
- type MonitorGroupPayload
- type MonitorMutationInput
- type MonitorPayload
- type NodeGroupPayload
- type NodeListenIPInput
- type NodeListenIPPayload
- type NodeMutationInput
- type NodePayload
- type NodePortRangeInput
- type NodePortRangePayload
- 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 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 ¶
View Source
const ( MemberStatusActive = "ACTIVE" MemberStatusDisabled = "DISABLED" )
Variables ¶
View Source
var ErrConflict = errors.New("conflict")
View Source
var ErrForbidden = errors.New("forbidden")
View Source
var ErrInvalidInput = errors.New("invalid input")
View Source
var ErrNotFound = errors.New("not found")
View Source
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 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) AcknowledgeNodeAgentConfig ¶
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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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
}
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 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 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
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"`
}
type NodePortRangeInput ¶
type NodePortRangePayload ¶
type OrganizationPayload ¶
type OrganizationUpdateInput ¶
type PortableRulePayload ¶
type PortableRulePayload struct {
Name string `json:"name"`
Tags []string `json:"tags"`
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 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
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"`
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"`
}
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_errors.go
- control_extensions.go
- control_nodes.go
- control_nodes_options.go
- control_nodes_options_oss.go
- control_rbac.go
- control_rule_diagnostics.go
- control_rule_helpers.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
Click to show internal directories.
Click to hide internal directories.