Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)
- func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
- func RegisterQuotaServiceServer(s grpc.ServiceRegistrar, srv QuotaServiceServer)
- func RegisterStreamBalancerServiceServer(s grpc.ServiceRegistrar, srv StreamBalancerServiceServer)
- func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type ConfigServiceClient
- type ConfigServiceServer
- type HealthServiceClient
- type HealthServiceServer
- type QuotaServiceClient
- type QuotaServiceServer
- type StreamBalancerServiceClient
- type StreamBalancerServiceServer
- type UnimplementedAuthServiceServer
- type UnimplementedConfigServiceServer
- func (UnimplementedConfigServiceServer) GetBrowserContext(context.Context, *v1.GetBrowserContextRequest) (*v1.GetBrowserContextResponse, error)
- func (UnimplementedConfigServiceServer) GetGuardConfig(context.Context, *v1.GetGuardConfigRequest) (*v1.GetGuardConfigResponse, error)
- func (UnimplementedConfigServiceServer) GetServiceConfig(context.Context, *v1.GetServiceConfigRequest) (*v1.GetServiceConfigResponse, error)
- type UnimplementedHealthServiceServer
- type UnimplementedQuotaServiceServer
- func (UnimplementedQuotaServiceServer) GetToken(context.Context, *v1.GetTokenRequest) (*v1.GetTokenResponse, error)
- func (UnimplementedQuotaServiceServer) GetTokenLease(context.Context, *v1.GetTokenLeaseRequest) (*v1.GetTokenLeaseResponse, error)
- func (UnimplementedQuotaServiceServer) SetTokenLeaseConsumed(context.Context, *v1.SetTokenLeaseConsumedRequest) (*v1.SetTokenLeaseConsumedResponse, error)
- func (UnimplementedQuotaServiceServer) ValidateToken(context.Context, *v1.ValidateTokenRequest) (*v1.ValidateTokenResponse, error)
- type UnimplementedStreamBalancerServiceServer
- type UnimplementedUsageServiceServer
- type UnsafeAuthServiceServer
- type UnsafeConfigServiceServer
- type UnsafeHealthServiceServer
- type UnsafeQuotaServiceServer
- type UnsafeStreamBalancerServiceServer
- type UnsafeUsageServiceServer
- type UsageServiceClient
- type UsageServiceServer
Constants ¶
const ( ConfigService_GetGuardConfig_FullMethodName = "/stanza.hub.v1.ConfigService/GetGuardConfig" ConfigService_GetBrowserContext_FullMethodName = "/stanza.hub.v1.ConfigService/GetBrowserContext" ConfigService_GetServiceConfig_FullMethodName = "/stanza.hub.v1.ConfigService/GetServiceConfig" )
const ( QuotaService_GetToken_FullMethodName = "/stanza.hub.v1.QuotaService/GetToken" QuotaService_GetTokenLease_FullMethodName = "/stanza.hub.v1.QuotaService/GetTokenLease" QuotaService_SetTokenLeaseConsumed_FullMethodName = "/stanza.hub.v1.QuotaService/SetTokenLeaseConsumed" QuotaService_ValidateToken_FullMethodName = "/stanza.hub.v1.QuotaService/ValidateToken" )
const (
AuthService_GetBearerToken_FullMethodName = "/stanza.hub.v1.AuthService/GetBearerToken"
)
const (
HealthService_QueryGuardHealth_FullMethodName = "/stanza.hub.v1.HealthService/QueryGuardHealth"
)
const (
StreamBalancerService_UpdateStreams_FullMethodName = "/stanza.hub.v1.StreamBalancerService/UpdateStreams"
)
const (
UsageService_GetUsage_FullMethodName = "/stanza.hub.v1.UsageService/GetUsage"
)
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBearerToken", Handler: _AuthService_GetBearerToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ConfigService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.ConfigService", HandlerType: (*ConfigServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetGuardConfig", Handler: _ConfigService_GetGuardConfig_Handler, }, { MethodName: "GetBrowserContext", Handler: _ConfigService_GetBrowserContext_Handler, }, { MethodName: "GetServiceConfig", Handler: _ConfigService_GetServiceConfig_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/config.proto", }
ConfigService_ServiceDesc is the grpc.ServiceDesc for ConfigService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var HealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.HealthService", HandlerType: (*HealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryGuardHealth", Handler: _HealthService_QueryGuardHealth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/health.proto", }
HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var QuotaService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.QuotaService", HandlerType: (*QuotaServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetToken", Handler: _QuotaService_GetToken_Handler, }, { MethodName: "GetTokenLease", Handler: _QuotaService_GetTokenLease_Handler, }, { MethodName: "SetTokenLeaseConsumed", Handler: _QuotaService_SetTokenLeaseConsumed_Handler, }, { MethodName: "ValidateToken", Handler: _QuotaService_ValidateToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/quota.proto", }
QuotaService_ServiceDesc is the grpc.ServiceDesc for QuotaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var StreamBalancerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.StreamBalancerService", HandlerType: (*StreamBalancerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateStreams", Handler: _StreamBalancerService_UpdateStreams_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/stream.proto", }
StreamBalancerService_ServiceDesc is the grpc.ServiceDesc for StreamBalancerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UsageService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stanza.hub.v1.UsageService", HandlerType: (*UsageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsage", Handler: _UsageService_GetUsage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stanza/hub/v1/usage.proto", }
UsageService_ServiceDesc is the grpc.ServiceDesc for UsageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
func RegisterConfigServiceServer ¶
func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)
func RegisterHealthServiceServer ¶
func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
func RegisterQuotaServiceServer ¶
func RegisterQuotaServiceServer(s grpc.ServiceRegistrar, srv QuotaServiceServer)
func RegisterStreamBalancerServiceServer ¶
func RegisterStreamBalancerServiceServer(s grpc.ServiceRegistrar, srv StreamBalancerServiceServer)
func RegisterUsageServiceServer ¶
func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
GetBearerToken(ctx context.Context, in *v1.GetBearerTokenRequest, opts ...grpc.CallOption) (*v1.GetBearerTokenResponse, error)
}
AuthServiceClient is the client API for AuthService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface {
GetBearerToken(context.Context, *v1.GetBearerTokenRequest) (*v1.GetBearerTokenResponse, error)
}
AuthServiceServer is the server API for AuthService service. All implementations should embed UnimplementedAuthServiceServer for forward compatibility.
type ConfigServiceClient ¶
type ConfigServiceClient interface {
GetGuardConfig(ctx context.Context, in *v1.GetGuardConfigRequest, opts ...grpc.CallOption) (*v1.GetGuardConfigResponse, error)
GetBrowserContext(ctx context.Context, in *v1.GetBrowserContextRequest, opts ...grpc.CallOption) (*v1.GetBrowserContextResponse, error)
GetServiceConfig(ctx context.Context, in *v1.GetServiceConfigRequest, opts ...grpc.CallOption) (*v1.GetServiceConfigResponse, error)
}
ConfigServiceClient is the client API for ConfigService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
The Config service definition. This service is used by the Stanza SDK to get Service and Guard configs. This service is used by the Browser SDK to get Browser Contexts.
func NewConfigServiceClient ¶
func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient
type ConfigServiceServer ¶
type ConfigServiceServer interface {
GetGuardConfig(context.Context, *v1.GetGuardConfigRequest) (*v1.GetGuardConfigResponse, error)
GetBrowserContext(context.Context, *v1.GetBrowserContextRequest) (*v1.GetBrowserContextResponse, error)
GetServiceConfig(context.Context, *v1.GetServiceConfigRequest) (*v1.GetServiceConfigResponse, error)
}
ConfigServiceServer is the server API for ConfigService service. All implementations should embed UnimplementedConfigServiceServer for forward compatibility.
The Config service definition. This service is used by the Stanza SDK to get Service and Guard configs. This service is used by the Browser SDK to get Browser Contexts.
type HealthServiceClient ¶
type HealthServiceClient interface {
QueryGuardHealth(ctx context.Context, in *v1.QueryGuardHealthRequest, opts ...grpc.CallOption) (*v1.QueryGuardHealthResponse, error)
}
HealthServiceClient is the client API for HealthService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
The Health service definition. This service is used by the Stanza SDK to allow devs to
make decisions about graceful degradation strategies to apply and to make decisions about fail-fast as high up the stack as possible.
"Keys" - API bearer tokens - are not included in API and should be sent via a X-Stanza-Key header. Customer IDs are determined based on the X-Stanza-Key header (each key is associated with one and only one customer). However, env must always be specified - stanza keys do not have to be specific to an environment, so we cannot infer the env from the key. Like quota service this should be accessed by SDK via HTTPS.
func NewHealthServiceClient ¶
func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient
type HealthServiceServer ¶
type HealthServiceServer interface {
QueryGuardHealth(context.Context, *v1.QueryGuardHealthRequest) (*v1.QueryGuardHealthResponse, error)
}
HealthServiceServer is the server API for HealthService service. All implementations should embed UnimplementedHealthServiceServer for forward compatibility.
The Health service definition. This service is used by the Stanza SDK to allow devs to
make decisions about graceful degradation strategies to apply and to make decisions about fail-fast as high up the stack as possible.
"Keys" - API bearer tokens - are not included in API and should be sent via a X-Stanza-Key header. Customer IDs are determined based on the X-Stanza-Key header (each key is associated with one and only one customer). However, env must always be specified - stanza keys do not have to be specific to an environment, so we cannot infer the env from the key. Like quota service this should be accessed by SDK via HTTPS.
type QuotaServiceClient ¶
type QuotaServiceClient interface {
GetToken(ctx context.Context, in *v1.GetTokenRequest, opts ...grpc.CallOption) (*v1.GetTokenResponse, error)
GetTokenLease(ctx context.Context, in *v1.GetTokenLeaseRequest, opts ...grpc.CallOption) (*v1.GetTokenLeaseResponse, error)
SetTokenLeaseConsumed(ctx context.Context, in *v1.SetTokenLeaseConsumedRequest, opts ...grpc.CallOption) (*v1.SetTokenLeaseConsumedResponse, error)
// Used by ingress Guards to validate Hub-generated tokens.
ValidateToken(ctx context.Context, in *v1.ValidateTokenRequest, opts ...grpc.CallOption) (*v1.ValidateTokenResponse, error)
}
QuotaServiceClient is the client API for QuotaService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
The Quota service definition. This service is used by the Stanza and Browser SDKs to determine whether quota is available to use services which are subject to centralised ratelimiting. "Keys" are not included in API and should be sent via a X-Stanza-Key header. Customer IDs are determined based on the X-Stanza-Key header (each key is associated with one and only one customer). However, environment must always be specified when requesting a token - Stanza keys do not have to be specific to an environment, so we cannot infer that from the key alone.
func NewQuotaServiceClient ¶
func NewQuotaServiceClient(cc grpc.ClientConnInterface) QuotaServiceClient
type QuotaServiceServer ¶
type QuotaServiceServer interface {
GetToken(context.Context, *v1.GetTokenRequest) (*v1.GetTokenResponse, error)
GetTokenLease(context.Context, *v1.GetTokenLeaseRequest) (*v1.GetTokenLeaseResponse, error)
SetTokenLeaseConsumed(context.Context, *v1.SetTokenLeaseConsumedRequest) (*v1.SetTokenLeaseConsumedResponse, error)
// Used by ingress Guards to validate Hub-generated tokens.
ValidateToken(context.Context, *v1.ValidateTokenRequest) (*v1.ValidateTokenResponse, error)
}
QuotaServiceServer is the server API for QuotaService service. All implementations should embed UnimplementedQuotaServiceServer for forward compatibility.
The Quota service definition. This service is used by the Stanza and Browser SDKs to determine whether quota is available to use services which are subject to centralised ratelimiting. "Keys" are not included in API and should be sent via a X-Stanza-Key header. Customer IDs are determined based on the X-Stanza-Key header (each key is associated with one and only one customer). However, environment must always be specified when requesting a token - Stanza keys do not have to be specific to an environment, so we cannot infer that from the key alone.
type StreamBalancerServiceClient ¶
type StreamBalancerServiceClient interface {
UpdateStreams(ctx context.Context, in *v1.UpdateStreamsRequest, opts ...grpc.CallOption) (*v1.UpdateStreamsResponse, error)
}
StreamBalancerServiceClient is the client API for StreamBalancerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Experimental feature for fair prioritised balancing of streaming activities.
func NewStreamBalancerServiceClient ¶
func NewStreamBalancerServiceClient(cc grpc.ClientConnInterface) StreamBalancerServiceClient
type StreamBalancerServiceServer ¶
type StreamBalancerServiceServer interface {
UpdateStreams(context.Context, *v1.UpdateStreamsRequest) (*v1.UpdateStreamsResponse, error)
}
StreamBalancerServiceServer is the server API for StreamBalancerService service. All implementations should embed UnimplementedStreamBalancerServiceServer for forward compatibility.
Experimental feature for fair prioritised balancing of streaming activities.
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthServiceServer) GetBearerToken ¶
func (UnimplementedAuthServiceServer) GetBearerToken(context.Context, *v1.GetBearerTokenRequest) (*v1.GetBearerTokenResponse, error)
type UnimplementedConfigServiceServer ¶
type UnimplementedConfigServiceServer struct{}
UnimplementedConfigServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedConfigServiceServer) GetBrowserContext ¶
func (UnimplementedConfigServiceServer) GetBrowserContext(context.Context, *v1.GetBrowserContextRequest) (*v1.GetBrowserContextResponse, error)
func (UnimplementedConfigServiceServer) GetGuardConfig ¶
func (UnimplementedConfigServiceServer) GetGuardConfig(context.Context, *v1.GetGuardConfigRequest) (*v1.GetGuardConfigResponse, error)
func (UnimplementedConfigServiceServer) GetServiceConfig ¶
func (UnimplementedConfigServiceServer) GetServiceConfig(context.Context, *v1.GetServiceConfigRequest) (*v1.GetServiceConfigResponse, error)
type UnimplementedHealthServiceServer ¶
type UnimplementedHealthServiceServer struct{}
UnimplementedHealthServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedHealthServiceServer) QueryGuardHealth ¶
func (UnimplementedHealthServiceServer) QueryGuardHealth(context.Context, *v1.QueryGuardHealthRequest) (*v1.QueryGuardHealthResponse, error)
type UnimplementedQuotaServiceServer ¶
type UnimplementedQuotaServiceServer struct{}
UnimplementedQuotaServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedQuotaServiceServer) GetToken ¶
func (UnimplementedQuotaServiceServer) GetToken(context.Context, *v1.GetTokenRequest) (*v1.GetTokenResponse, error)
func (UnimplementedQuotaServiceServer) GetTokenLease ¶
func (UnimplementedQuotaServiceServer) GetTokenLease(context.Context, *v1.GetTokenLeaseRequest) (*v1.GetTokenLeaseResponse, error)
func (UnimplementedQuotaServiceServer) SetTokenLeaseConsumed ¶
func (UnimplementedQuotaServiceServer) SetTokenLeaseConsumed(context.Context, *v1.SetTokenLeaseConsumedRequest) (*v1.SetTokenLeaseConsumedResponse, error)
func (UnimplementedQuotaServiceServer) ValidateToken ¶
func (UnimplementedQuotaServiceServer) ValidateToken(context.Context, *v1.ValidateTokenRequest) (*v1.ValidateTokenResponse, error)
type UnimplementedStreamBalancerServiceServer ¶
type UnimplementedStreamBalancerServiceServer struct{}
UnimplementedStreamBalancerServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedStreamBalancerServiceServer) UpdateStreams ¶
func (UnimplementedStreamBalancerServiceServer) UpdateStreams(context.Context, *v1.UpdateStreamsRequest) (*v1.UpdateStreamsResponse, error)
type UnimplementedUsageServiceServer ¶
type UnimplementedUsageServiceServer struct{}
UnimplementedUsageServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUsageServiceServer) GetUsage ¶
func (UnimplementedUsageServiceServer) GetUsage(context.Context, *v1.GetUsageRequest) (*v1.GetUsageResponse, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UnsafeConfigServiceServer ¶
type UnsafeConfigServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigServiceServer will result in compilation errors.
type UnsafeHealthServiceServer ¶
type UnsafeHealthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.
type UnsafeQuotaServiceServer ¶
type UnsafeQuotaServiceServer interface {
// contains filtered or unexported methods
}
UnsafeQuotaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QuotaServiceServer will result in compilation errors.
type UnsafeStreamBalancerServiceServer ¶
type UnsafeStreamBalancerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStreamBalancerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamBalancerServiceServer will result in compilation errors.
type UnsafeUsageServiceServer ¶
type UnsafeUsageServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUsageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsageServiceServer will result in compilation errors.
type UsageServiceClient ¶
type UsageServiceClient interface {
GetUsage(ctx context.Context, in *v1.GetUsageRequest, opts ...grpc.CallOption) (*v1.GetUsageResponse, error)
}
UsageServiceClient is the client API for UsageService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Used to get statistics on usage from Stanza, sliced and diced in various ways.
func NewUsageServiceClient ¶
func NewUsageServiceClient(cc grpc.ClientConnInterface) UsageServiceClient
type UsageServiceServer ¶
type UsageServiceServer interface {
GetUsage(context.Context, *v1.GetUsageRequest) (*v1.GetUsageResponse, error)
}
UsageServiceServer is the server API for UsageService service. All implementations should embed UnimplementedUsageServiceServer for forward compatibility.
Used to get statistics on usage from Stanza, sliced and diced in various ways.
Source Files
¶
- auth_grpc.pb.go
- config_grpc.pb.go
- health_grpc.pb.go
- quota_grpc.pb.go
- stream_grpc.pb.go
- usage_grpc.pb.go