Documentation
¶
Index ¶
- func ClientHelloRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerHelloRPCClient, ...)
- func ClientProbeRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerProbeRPCClient, ...)
- func ClientSurveyRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerSurveyRPCClient, ...)
- func ClientTLSConfig(tlsCrt string, tlsKey string, rootCA string, addr string) (*tls.Config, error)
- func GetPeerCache(cache *ristretto.Cache, key interface{}) (string, bool)
- func InitPeerCache(evict OnEvict) (*ristretto.Cache, error)
- func InsertPeerCache(cache *ristretto.Cache, expiry time.Duration, key, value interface{}) bool
- func NewAuditInfoServer(bs service.BootstrapService, aps service.AccountPermissionService) sentryrpc.AuditInformationServiceServer
- func NewAuditLogServer(auditLogService q.AuditLogService) (v1.AuditLogServiceServer, error)
- func NewAuthServer(as authv3.AuthService) rpcv3.AuthServiceServer
- func NewBootstrapServer(bs service.BootstrapService, f cryptoutil.PasswordFunc, ...) sentryrpc.BootstrapServiceServer
- func NewClusterAuthzServer(bs service.BootstrapService, aps service.AccountPermissionService, ...) sentryrpc.ClusterAuthorizationServiceServer
- func NewClusterServer(es service.ClusterService, data *common.DownloadData) rpcv3.ClusterServiceServer
- func NewGroupServer(ps service.GroupService) rpcv3.GroupServiceServer
- func NewIdpServer(is service.IdpService) rpcv3.IdpServiceServer
- func NewKubeConfigServer(bs service.BootstrapService, aps service.AccountPermissionService, ...) sentryrpc.KubeConfigServiceServer
- func NewKubectlClusterSettingsServer(bs service.BootstrapService, kcs service.KubectlClusterSettingsService) sentryrpc.KubectlClusterSettingsServiceServer
- func NewLocationServer(ms service.MetroService) systemrpc.LocationServiceServer
- func NewOIDCServer(providerSvc service.OIDCProviderService) rpcv3.OIDCProviderServiceServer
- func NewOrganizationServer(ps service.OrganizationService) systemrpc.OrganizationServiceServer
- func NewPartnerServer(ps service.PartnerService) systemrpc.PartnerServiceServer
- func NewProjectServer(ps service.ProjectService) systemrpc.ProjectServiceServer
- func NewRelayAuditServer(relayAuditService q.RelayAuditService, ...) (v1.RelayAuditServiceServer, error)
- func NewRelayPeerService() (sentryrpc.RelayPeerServiceServer, error)
- func NewRolePermissionServer(ps service.RolepermissionService) rpcv3.RolepermissionServiceServer
- func NewRoleServer(ps service.RoleService) rpcv3.RoleServiceServer
- func NewUserServer(ps service.UserService, as service.ApiKeyService) rpcv3.UserServiceServer
- func RunRelaySurveyHandler(stop <-chan struct{}, svc interface{})
- type OnEvict
- type RelayAgentDownloadData
- type RelayClusterConnectionInfo
- type RelayNetworkDownloadData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientHelloRPC ¶
func ClientHelloRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerHelloRPCClient, interval time.Duration, relayUUID string, ip func() string)
ClientHelloRPC will handle periodic heartbeat messages between relay and the core service.
func ClientProbeRPC ¶
func ClientProbeRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerProbeRPCClient, pcache *ristretto.Cache, relayUUID string, expiry time.Duration, peerProbeChanel chan string, ip func() string)
ClientProbeRPC will manage the probes. When a relay neeed to probe for connections for a cluster it will add a probe message to probe channel. The probe rpc will send that message to probe core service. When a probe response get inserted to peerCache.
func ClientSurveyRPC ¶
func ClientSurveyRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerSurveyRPCClient, relayUUID string, ip func() string, dialinlookup func(string) int)
ClientSurveyRPC will handle the survey RPC. When a relay neeed to probe for connections for a cluster it will message to probe core service. The service then sends survey to all the connected relays (survey-request). On survey request, the relay will lookup its local-dialin-map and reply to core if connection from the given cluster is available.
func ClientTLSConfig ¶
ClientTLSConfig sets tls config
func GetPeerCache ¶
GetPeerCache get value from cache and if more than 1 rnadomly select the peer
func InitPeerCache ¶
InitPeerCache initialize the cache to store dialin cluster-connection information of peers. When a dialin miss happens look into this cache to find the peer IP address to forward the user connection.
func InsertPeerCache ¶
InsertPeerCache inserts the value to cache
func NewAuditInfoServer ¶
func NewAuditInfoServer(bs service.BootstrapService, aps service.AccountPermissionService) sentryrpc.AuditInformationServiceServer
NewAuditInfoServer returns new Audit Information Server
func NewAuditLogServer ¶
func NewAuditLogServer(auditLogService q.AuditLogService) (v1.AuditLogServiceServer, error)
NewAuditServer returns new placement server implementation
func NewAuthServer ¶
func NewAuthServer(as authv3.AuthService) rpcv3.AuthServiceServer
NewAuthServer returns new auth server implementation
func NewBootstrapServer ¶
func NewBootstrapServer(bs service.BootstrapService, f cryptoutil.PasswordFunc, cs service.ClusterService) sentryrpc.BootstrapServiceServer
NewBootstrapServer return new bootstrap server
func NewClusterAuthzServer ¶
func NewClusterAuthzServer(bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, krs service.KubeconfigRevocationService, kcs service.KubectlClusterSettingsService, kss service.KubeconfigSettingService, ns service.NamespaceService) sentryrpc.ClusterAuthorizationServiceServer
NewClusterAuthzServer returns New ClusterAuthzServer
func NewClusterServer ¶
func NewClusterServer(es service.ClusterService, data *common.DownloadData) rpcv3.ClusterServiceServer
NewClusterServer returns new cluster server implementation
func NewGroupServer ¶
func NewGroupServer(ps service.GroupService) rpcv3.GroupServiceServer
NewGroupServer returns new group server implementation
func NewIdpServer ¶
func NewIdpServer(is service.IdpService) rpcv3.IdpServiceServer
func NewKubeConfigServer ¶
func NewKubeConfigServer(bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, kss service.KubeconfigSettingService, krs service.KubeconfigRevocationService, pf cryptoutil.PasswordFunc, ksvc service.ApiKeyService, os service.OrganizationService, ps service.PartnerService, al *zap.Logger) sentryrpc.KubeConfigServiceServer
NewKubeConfigServer returns new kube config server
func NewKubectlClusterSettingsServer ¶
func NewKubectlClusterSettingsServer(bs service.BootstrapService, kcs service.KubectlClusterSettingsService) sentryrpc.KubectlClusterSettingsServiceServer
NewKubectlClusterSettingsServer returns new kubectl cluster setting server
func NewLocationServer ¶
func NewLocationServer(ms service.MetroService) systemrpc.LocationServiceServer
NewLocationServer returns new location server implementation
func NewOIDCServer ¶
func NewOIDCServer(providerSvc service.OIDCProviderService) rpcv3.OIDCProviderServiceServer
func NewOrganizationServer ¶
func NewOrganizationServer(ps service.OrganizationService) systemrpc.OrganizationServiceServer
NewOrganizationServer returns new organization server implementation
func NewPartnerServer ¶
func NewPartnerServer(ps service.PartnerService) systemrpc.PartnerServiceServer
NewPartnerServer returns new partner server implementation
func NewProjectServer ¶
func NewProjectServer(ps service.ProjectService) systemrpc.ProjectServiceServer
NewProjectServer returns new project server implementation
func NewRelayAuditServer ¶
func NewRelayAuditServer(relayAuditService q.RelayAuditService, relayCommandAuditService q.AuditLogService) (v1.RelayAuditServiceServer, error)
NewAuditServer returns new placement server implementation
func NewRelayPeerService ¶
func NewRelayPeerService() (sentryrpc.RelayPeerServiceServer, error)
NewRelayPeerService returns new placement server implementation
func NewRolePermissionServer ¶
func NewRolePermissionServer(ps service.RolepermissionService) rpcv3.RolepermissionServiceServer
NewRolePermissionServer returns new role server implementation
func NewRoleServer ¶
func NewRoleServer(ps service.RoleService) rpcv3.RoleServiceServer
NewRoleServer returns new role server implementation
func NewUserServer ¶
func NewUserServer(ps service.UserService, as service.ApiKeyService) rpcv3.UserServiceServer
NewUserServer returns new user server implementation
func RunRelaySurveyHandler ¶
func RunRelaySurveyHandler(stop <-chan struct{}, svc interface{})
RunRelaySurveyHandler is the cotrol loop that maintains the peer suvey messages.
Types ¶
type RelayAgentDownloadData ¶
type RelayClusterConnectionInfo ¶
RelayClusterConnectionInfo relay conn info