hubv1

package
v0.0.0-...-0439f2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package hubv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package hubv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package hubv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package hubv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package hubv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
const (
	AuthService_GetBearerToken_FullMethodName = "/stanza.hub.v1.AuthService/GetBearerToken"
)
View Source
const (
	HealthService_QueryGuardHealth_FullMethodName = "/stanza.hub.v1.HealthService/QueryGuardHealth"
)
View Source
const (
	UsageService_GetUsage_FullMethodName = "/stanza.hub.v1.UsageService/GetUsage"
)

Variables

View Source
var (
	Health_name = map[int32]string{
		0: "HEALTH_UNSPECIFIED",
		1: "HEALTH_OK",
		2: "HEALTH_OVERLOAD",
		3: "HEALTH_DOWN",
	}
	Health_value = map[string]int32{
		"HEALTH_UNSPECIFIED": 0,
		"HEALTH_OK":          1,
		"HEALTH_OVERLOAD":    2,
		"HEALTH_DOWN":        3,
	}
)

Enum value maps for Health.

View Source
var (
	State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "STATE_ENABLED",
		2: "STATE_DISABLED",
	}
	State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"STATE_ENABLED":     1,
		"STATE_DISABLED":    2,
	}
)

Enum value maps for State.

View Source
var (
	Reason_name = map[int32]string{
		0: "REASON_UNSPECIFIED",
		1: "REASON_SUFFICIENT_QUOTA",
		2: "REASON_INSUFFICIENT_QUOTA",
		3: "REASON_INSUFFICIENT_QUOTA_PARENT",
		4: "REASON_BURST",
		5: "REASON_BEST_EFFORT",
	}
	Reason_value = map[string]int32{
		"REASON_UNSPECIFIED":               0,
		"REASON_SUFFICIENT_QUOTA":          1,
		"REASON_INSUFFICIENT_QUOTA":        2,
		"REASON_INSUFFICIENT_QUOTA_PARENT": 3,
		"REASON_BURST":                     4,
		"REASON_BEST_EFFORT":               5,
	}
)

Enum value maps for Reason.

View Source
var (
	QueryMode_name = map[int32]string{
		0: "QUERY_MODE_UNSPECIFIED",
		1: "QUERY_MODE_SUM",
		2: "QUERY_MODE_REPORT",
	}
	QueryMode_value = map[string]int32{
		"QUERY_MODE_UNSPECIFIED": 0,
		"QUERY_MODE_SUM":         1,
		"QUERY_MODE_REPORT":      2,
	}
)

Enum value maps for QueryMode.

View Source
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)

View Source
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)

View Source
var File_stanza_hub_v1_auth_proto protoreflect.FileDescriptor
View Source
var File_stanza_hub_v1_common_proto protoreflect.FileDescriptor
View Source
var File_stanza_hub_v1_config_proto protoreflect.FileDescriptor
View Source
var File_stanza_hub_v1_health_proto protoreflect.FileDescriptor
View Source
var File_stanza_hub_v1_quota_proto protoreflect.FileDescriptor
View Source
var File_stanza_hub_v1_usage_proto protoreflect.FileDescriptor
View Source
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)

View Source
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)

View Source
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 RegisterAuthServiceHandler

func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthServiceHandlerClient

func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error

RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors.

func RegisterAuthServiceHandlerFromEndpoint

func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthServiceHandlerServer

func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error

RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

func RegisterConfigServiceHandler

func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterConfigServiceHandlerClient

func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error

RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConfigServiceClient" to call the correct interceptors.

func RegisterConfigServiceHandlerFromEndpoint

func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterConfigServiceHandlerServer

func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error

RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux". UnaryRPC :call ConfigServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigServiceHandlerFromEndpoint instead.

func RegisterConfigServiceServer

func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)

func RegisterHealthServiceHandler

func RegisterHealthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterHealthServiceHandler registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterHealthServiceHandlerClient

func RegisterHealthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthServiceClient) error

RegisterHealthServiceHandlerClient registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthServiceClient" to call the correct interceptors.

func RegisterHealthServiceHandlerFromEndpoint

func RegisterHealthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterHealthServiceHandlerFromEndpoint is same as RegisterHealthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterHealthServiceHandlerServer

func RegisterHealthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServiceServer) error

RegisterHealthServiceHandlerServer registers the http handlers for service HealthService to "mux". UnaryRPC :call HealthServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthServiceHandlerFromEndpoint instead.

func RegisterHealthServiceServer

func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)

func RegisterQuotaServiceHandler

func RegisterQuotaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQuotaServiceHandler registers the http handlers for service QuotaService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQuotaServiceHandlerClient

func RegisterQuotaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QuotaServiceClient) error

RegisterQuotaServiceHandlerClient registers the http handlers for service QuotaService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QuotaServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QuotaServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QuotaServiceClient" to call the correct interceptors.

func RegisterQuotaServiceHandlerFromEndpoint

func RegisterQuotaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQuotaServiceHandlerFromEndpoint is same as RegisterQuotaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQuotaServiceHandlerServer

func RegisterQuotaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QuotaServiceServer) error

RegisterQuotaServiceHandlerServer registers the http handlers for service QuotaService to "mux". UnaryRPC :call QuotaServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQuotaServiceHandlerFromEndpoint instead.

func RegisterQuotaServiceServer

func RegisterQuotaServiceServer(s grpc.ServiceRegistrar, srv QuotaServiceServer)

func RegisterUsageServiceHandler

func RegisterUsageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUsageServiceHandler registers the http handlers for service UsageService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUsageServiceHandlerClient

func RegisterUsageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsageServiceClient) error

RegisterUsageServiceHandlerClient registers the http handlers for service UsageService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsageServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsageServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsageServiceClient" to call the correct interceptors.

func RegisterUsageServiceHandlerFromEndpoint

func RegisterUsageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUsageServiceHandlerFromEndpoint is same as RegisterUsageServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUsageServiceHandlerServer

func RegisterUsageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsageServiceServer) error

RegisterUsageServiceHandlerServer registers the http handlers for service UsageService to "mux". UnaryRPC :call UsageServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUsageServiceHandlerFromEndpoint instead.

func RegisterUsageServiceServer

func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	GetBearerToken(ctx context.Context, in *GetBearerTokenRequest, opts ...grpc.CallOption) (*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.

type AuthServiceServer

type AuthServiceServer interface {
	GetBearerToken(context.Context, *GetBearerTokenRequest) (*GetBearerTokenResponse, error)
}

AuthServiceServer is the server API for AuthService service. All implementations should embed UnimplementedAuthServiceServer for forward compatibility

type BrowserConfig

type BrowserConfig struct {
	EnabledPercent     *uint32 `protobuf:"varint,2,opt,name=enabled_percent,json=enabledPercent,proto3,oneof" json:"enabled_percent,omitempty"`
	ActionCodeEnabled  *uint32 `protobuf:"varint,3,opt,name=action_code_enabled,json=actionCodeEnabled,proto3,oneof" json:"action_code_enabled,omitempty"`
	MessageEnabled     *string `protobuf:"bytes,4,opt,name=message_enabled,json=messageEnabled,proto3,oneof" json:"message_enabled,omitempty"`
	ActionCodeDisabled *uint32 `protobuf:"varint,5,opt,name=action_code_disabled,json=actionCodeDisabled,proto3,oneof" json:"action_code_disabled,omitempty"`
	MessageDisabled    *string `protobuf:"bytes,6,opt,name=message_disabled,json=messageDisabled,proto3,oneof" json:"message_disabled,omitempty"`
	// contains filtered or unexported fields
}

BrowserConfig describes the current configuration for one Feature. Instead of being simply enabled or disabled, features are enabled for a particular percentage of clients (0% is entirely disabled, 100% is entirely enabled). Clients are required to self-select a percentile value from 1 to 100 in a way that is random and trusted to consider a Feature disabled if it is disabled for the selected percentile. action_code_disabled describes what the Browser is expected to do if the Feature is not enabled for their assigned percentile. message_disabled may be displayed as a fallback action. action_code_enabled describes what the Browser is expected to do if the Feature is enabled for their assigned percentile. This enabled degraded modes. Can be empty. message_enabled may be displayed while in degraded mode. Can be empty. Likely additional fields will be added here as the Browser SDK behavior set becomes more complex.

func (*BrowserConfig) Descriptor deprecated

func (*BrowserConfig) Descriptor() ([]byte, []int)

Deprecated: Use BrowserConfig.ProtoReflect.Descriptor instead.

func (*BrowserConfig) GetActionCodeDisabled

func (x *BrowserConfig) GetActionCodeDisabled() uint32

func (*BrowserConfig) GetActionCodeEnabled

func (x *BrowserConfig) GetActionCodeEnabled() uint32

func (*BrowserConfig) GetEnabledPercent

func (x *BrowserConfig) GetEnabledPercent() uint32

func (*BrowserConfig) GetMessageDisabled

func (x *BrowserConfig) GetMessageDisabled() string

func (*BrowserConfig) GetMessageEnabled

func (x *BrowserConfig) GetMessageEnabled() string

func (*BrowserConfig) ProtoMessage

func (*BrowserConfig) ProtoMessage()

func (*BrowserConfig) ProtoReflect

func (x *BrowserConfig) ProtoReflect() protoreflect.Message

func (*BrowserConfig) Reset

func (x *BrowserConfig) Reset()

func (*BrowserConfig) String

func (x *BrowserConfig) String() string

type ConfigServiceClient

type ConfigServiceClient interface {
	GetGuardConfig(ctx context.Context, in *GetGuardConfigRequest, opts ...grpc.CallOption) (*GetGuardConfigResponse, error)
	GetBrowserContext(ctx context.Context, in *GetBrowserContextRequest, opts ...grpc.CallOption) (*GetBrowserContextResponse, error)
	GetServiceConfig(ctx context.Context, in *GetServiceConfigRequest, opts ...grpc.CallOption) (*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.

type ConfigServiceServer

ConfigServiceServer is the server API for ConfigService service. All implementations should embed UnimplementedConfigServiceServer for forward compatibility

type FeatureConfig

type FeatureConfig struct {
	Name   string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Config *BrowserConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureConfig) Descriptor deprecated

func (*FeatureConfig) Descriptor() ([]byte, []int)

Deprecated: Use FeatureConfig.ProtoReflect.Descriptor instead.

func (*FeatureConfig) GetConfig

func (x *FeatureConfig) GetConfig() *BrowserConfig

func (*FeatureConfig) GetName

func (x *FeatureConfig) GetName() string

func (*FeatureConfig) ProtoMessage

func (*FeatureConfig) ProtoMessage()

func (*FeatureConfig) ProtoReflect

func (x *FeatureConfig) ProtoReflect() protoreflect.Message

func (*FeatureConfig) Reset

func (x *FeatureConfig) Reset()

func (*FeatureConfig) String

func (x *FeatureConfig) String() string

type FeatureSelector

type FeatureSelector struct {
	Environment string   `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	Names       []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
	Tags        []*Tag   `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureSelector) Descriptor deprecated

func (*FeatureSelector) Descriptor() ([]byte, []int)

Deprecated: Use FeatureSelector.ProtoReflect.Descriptor instead.

func (*FeatureSelector) GetEnvironment

func (x *FeatureSelector) GetEnvironment() string

func (*FeatureSelector) GetNames

func (x *FeatureSelector) GetNames() []string

func (*FeatureSelector) GetTags

func (x *FeatureSelector) GetTags() []*Tag

func (*FeatureSelector) ProtoMessage

func (*FeatureSelector) ProtoMessage()

func (*FeatureSelector) ProtoReflect

func (x *FeatureSelector) ProtoReflect() protoreflect.Message

func (*FeatureSelector) Reset

func (x *FeatureSelector) Reset()

func (*FeatureSelector) String

func (x *FeatureSelector) String() string

type GetBearerTokenRequest

type GetBearerTokenRequest struct {
	// contains filtered or unexported fields
}

GetBearerTokenRequest is empty, please pass your API key via a X-Stanza-Key header.

func (*GetBearerTokenRequest) Descriptor deprecated

func (*GetBearerTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBearerTokenRequest.ProtoReflect.Descriptor instead.

func (*GetBearerTokenRequest) ProtoMessage

func (*GetBearerTokenRequest) ProtoMessage()

func (*GetBearerTokenRequest) ProtoReflect

func (x *GetBearerTokenRequest) ProtoReflect() protoreflect.Message

func (*GetBearerTokenRequest) Reset

func (x *GetBearerTokenRequest) Reset()

func (*GetBearerTokenRequest) String

func (x *GetBearerTokenRequest) String() string

type GetBearerTokenResponse

type GetBearerTokenResponse struct {
	BearerToken string `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"`
	// contains filtered or unexported fields
}

GetBearerTokenResponse is a new Bearer Token.

func (*GetBearerTokenResponse) Descriptor deprecated

func (*GetBearerTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBearerTokenResponse.ProtoReflect.Descriptor instead.

func (*GetBearerTokenResponse) GetBearerToken

func (x *GetBearerTokenResponse) GetBearerToken() string

func (*GetBearerTokenResponse) ProtoMessage

func (*GetBearerTokenResponse) ProtoMessage()

func (*GetBearerTokenResponse) ProtoReflect

func (x *GetBearerTokenResponse) ProtoReflect() protoreflect.Message

func (*GetBearerTokenResponse) Reset

func (x *GetBearerTokenResponse) Reset()

func (*GetBearerTokenResponse) String

func (x *GetBearerTokenResponse) String() string

type GetBrowserContextRequest

type GetBrowserContextRequest struct {

	// Information required to select and return the most recent BrowserContext version. If Feature names is nil, will return all Features in the organization associated with the bearer token/API key, otherwise only information related to the named Features will be returned.
	Feature *FeatureSelector `protobuf:"bytes,1,opt,name=feature,proto3" json:"feature,omitempty"`
	// contains filtered or unexported fields
}

The request from Browser SDKs for a Browser Context. SDKs are expected to periodically poll, giving the version of the most recent configuration seen. Configurations may be large; we will not re-send them unless they have changed.

func (*GetBrowserContextRequest) Descriptor deprecated

func (*GetBrowserContextRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBrowserContextRequest.ProtoReflect.Descriptor instead.

func (*GetBrowserContextRequest) GetFeature

func (x *GetBrowserContextRequest) GetFeature() *FeatureSelector

func (*GetBrowserContextRequest) ProtoMessage

func (*GetBrowserContextRequest) ProtoMessage()

func (*GetBrowserContextRequest) ProtoReflect

func (x *GetBrowserContextRequest) ProtoReflect() protoreflect.Message

func (*GetBrowserContextRequest) Reset

func (x *GetBrowserContextRequest) Reset()

func (*GetBrowserContextRequest) String

func (x *GetBrowserContextRequest) String() string

type GetBrowserContextResponse

type GetBrowserContextResponse struct {
	FeatureConfigs []*FeatureConfig `protobuf:"bytes,2,rep,name=feature_configs,json=featureConfigs,proto3" json:"feature_configs,omitempty"`
	// contains filtered or unexported fields
}

The response to Browser SDKs is designed to be cacheable for short periods. It is also designed to be shareable between multiple clients (e.g. in case of SSR or use of CDN etc). May return 304 Not Modified with ETag header and empty payload.

func (*GetBrowserContextResponse) Descriptor deprecated

func (*GetBrowserContextResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBrowserContextResponse.ProtoReflect.Descriptor instead.

func (*GetBrowserContextResponse) GetFeatureConfigs

func (x *GetBrowserContextResponse) GetFeatureConfigs() []*FeatureConfig

func (*GetBrowserContextResponse) ProtoMessage

func (*GetBrowserContextResponse) ProtoMessage()

func (*GetBrowserContextResponse) ProtoReflect

func (*GetBrowserContextResponse) Reset

func (x *GetBrowserContextResponse) Reset()

func (*GetBrowserContextResponse) String

func (x *GetBrowserContextResponse) String() string

type GetGuardConfigRequest

type GetGuardConfigRequest struct {

	// Set if the client has seen a previous version of the config. Server will send data only if newer config available.
	VersionSeen *string `protobuf:"bytes,1,opt,name=version_seen,json=versionSeen,proto3,oneof" json:"version_seen,omitempty"`
	// Information required to select and return the correct GuardConfig version.
	Selector *GuardServiceSelector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
	// contains filtered or unexported fields
}

Request from Backend SDKs for a Guard Config. SDKs are expected to periodically poll, giving the version of the most recent configuration seen. Configurations may be large; we will not re-send them unless they have changed. Guard configurations may vary between environments but are SHARED between Services.

func (*GetGuardConfigRequest) Descriptor deprecated

func (*GetGuardConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetGuardConfigRequest.ProtoReflect.Descriptor instead.

func (*GetGuardConfigRequest) GetSelector

func (x *GetGuardConfigRequest) GetSelector() *GuardServiceSelector

func (*GetGuardConfigRequest) GetVersionSeen

func (x *GetGuardConfigRequest) GetVersionSeen() string

func (*GetGuardConfigRequest) ProtoMessage

func (*GetGuardConfigRequest) ProtoMessage()

func (*GetGuardConfigRequest) ProtoReflect

func (x *GetGuardConfigRequest) ProtoReflect() protoreflect.Message

func (*GetGuardConfigRequest) Reset

func (x *GetGuardConfigRequest) Reset()

func (*GetGuardConfigRequest) String

func (x *GetGuardConfigRequest) String() string

type GetGuardConfigResponse

type GetGuardConfigResponse struct {
	Version        string       `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	ConfigDataSent bool         `protobuf:"varint,2,opt,name=config_data_sent,json=configDataSent,proto3" json:"config_data_sent,omitempty"`
	Config         *GuardConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

The response from Hub to Backend SDKs. Note that `config_data_sent` will be false and `config` will be empty if we did not have a newer config version than `version_seen`.

func (*GetGuardConfigResponse) Descriptor deprecated

func (*GetGuardConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetGuardConfigResponse.ProtoReflect.Descriptor instead.

func (*GetGuardConfigResponse) GetConfig

func (x *GetGuardConfigResponse) GetConfig() *GuardConfig

func (*GetGuardConfigResponse) GetConfigDataSent

func (x *GetGuardConfigResponse) GetConfigDataSent() bool

func (*GetGuardConfigResponse) GetVersion

func (x *GetGuardConfigResponse) GetVersion() string

func (*GetGuardConfigResponse) ProtoMessage

func (*GetGuardConfigResponse) ProtoMessage()

func (*GetGuardConfigResponse) ProtoReflect

func (x *GetGuardConfigResponse) ProtoReflect() protoreflect.Message

func (*GetGuardConfigResponse) Reset

func (x *GetGuardConfigResponse) Reset()

func (*GetGuardConfigResponse) String

func (x *GetGuardConfigResponse) String() string

type GetServiceConfigRequest

type GetServiceConfigRequest struct {

	// Set if the client has seen a previous version of the config. Server will send data only if newer config available.
	VersionSeen string `protobuf:"bytes,1,opt,name=version_seen,json=versionSeen,proto3" json:"version_seen,omitempty"`
	// Information required to select and return the most recent ServiceConfig version
	Service *ServiceSelector `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

The request from Backend SDKs for a Service Config. SDKs are expected to periodically poll, giving the version of the most recent configuration seen. Configurations may be large; we will not re-send them unless they have changed.

func (*GetServiceConfigRequest) Descriptor deprecated

func (*GetServiceConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetServiceConfigRequest.ProtoReflect.Descriptor instead.

func (*GetServiceConfigRequest) GetService

func (x *GetServiceConfigRequest) GetService() *ServiceSelector

func (*GetServiceConfigRequest) GetVersionSeen

func (x *GetServiceConfigRequest) GetVersionSeen() string

func (*GetServiceConfigRequest) ProtoMessage

func (*GetServiceConfigRequest) ProtoMessage()

func (*GetServiceConfigRequest) ProtoReflect

func (x *GetServiceConfigRequest) ProtoReflect() protoreflect.Message

func (*GetServiceConfigRequest) Reset

func (x *GetServiceConfigRequest) Reset()

func (*GetServiceConfigRequest) String

func (x *GetServiceConfigRequest) String() string

type GetServiceConfigResponse

type GetServiceConfigResponse struct {
	Version        string         `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	ConfigDataSent bool           `protobuf:"varint,2,opt,name=config_data_sent,json=configDataSent,proto3" json:"config_data_sent,omitempty"`
	Config         *ServiceConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

The response to Backend SDKs. Note that `config_data_sent` will be false and `config` will be empty if we did not have a newer config version than `version_seen`.

func (*GetServiceConfigResponse) Descriptor deprecated

func (*GetServiceConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetServiceConfigResponse.ProtoReflect.Descriptor instead.

func (*GetServiceConfigResponse) GetConfig

func (x *GetServiceConfigResponse) GetConfig() *ServiceConfig

func (*GetServiceConfigResponse) GetConfigDataSent

func (x *GetServiceConfigResponse) GetConfigDataSent() bool

func (*GetServiceConfigResponse) GetVersion

func (x *GetServiceConfigResponse) GetVersion() string

func (*GetServiceConfigResponse) ProtoMessage

func (*GetServiceConfigResponse) ProtoMessage()

func (*GetServiceConfigResponse) ProtoReflect

func (x *GetServiceConfigResponse) ProtoReflect() protoreflect.Message

func (*GetServiceConfigResponse) Reset

func (x *GetServiceConfigResponse) Reset()

func (*GetServiceConfigResponse) String

func (x *GetServiceConfigResponse) String() string

type GetTokenLeaseRequest

type GetTokenLeaseRequest struct {

	// Only tags which are used for quota management should be included here - i.e. the list of quota_tags returned by the GetGuardConfig endpoint for this Guard. If tags are in use only one quota token will be issued at a time.
	Selector *GuardFeatureSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Used for tracking per-client token usage, allowing automatic determination of efficient batch leases. ID should be assigned by Stanza clients and be unique per-customer. Host or instance names may be used, or a UUID.
	ClientId *string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
	// Used to boost priority - SDK can increase or decrease priority of request, relative to normal feature priority. For instance, a customer may wish to boost the priority of paid user traffic over free tier. Priority boosts may also be negative - for example, one might deprioritise bot traffic.
	PriorityBoost *int32 `protobuf:"varint,5,opt,name=priority_boost,json=priorityBoost,proto3,oneof" json:"priority_boost,omitempty"`
	// Used for request weighting, i.e. accounting for varying request sizes and costs. The value set here is the default request weight which should be assumed for leases. If not specified, then the median weight is used when granted leases. Actual weights should be set via the SetTokenLeaseConsumed rpc.
	//
	// default_weight is optional; if not used then it is assumed that all requests have weight of 1.
	DefaultWeight *float32 `protobuf:"fixed32,7,opt,name=default_weight,json=defaultWeight,proto3,oneof" json:"default_weight,omitempty"`
	// contains filtered or unexported fields
}

Requests token lease for given Guard at priority of specified feature.

func (*GetTokenLeaseRequest) Descriptor deprecated

func (*GetTokenLeaseRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTokenLeaseRequest.ProtoReflect.Descriptor instead.

func (*GetTokenLeaseRequest) GetClientId

func (x *GetTokenLeaseRequest) GetClientId() string

func (*GetTokenLeaseRequest) GetDefaultWeight

func (x *GetTokenLeaseRequest) GetDefaultWeight() float32

func (*GetTokenLeaseRequest) GetPriorityBoost

func (x *GetTokenLeaseRequest) GetPriorityBoost() int32

func (*GetTokenLeaseRequest) GetSelector

func (x *GetTokenLeaseRequest) GetSelector() *GuardFeatureSelector

func (*GetTokenLeaseRequest) ProtoMessage

func (*GetTokenLeaseRequest) ProtoMessage()

func (*GetTokenLeaseRequest) ProtoReflect

func (x *GetTokenLeaseRequest) ProtoReflect() protoreflect.Message

func (*GetTokenLeaseRequest) Reset

func (x *GetTokenLeaseRequest) Reset()

func (*GetTokenLeaseRequest) String

func (x *GetTokenLeaseRequest) String() string

type GetTokenLeaseResponse

type GetTokenLeaseResponse struct {
	Granted bool          `protobuf:"varint,1,opt,name=granted,proto3" json:"granted,omitempty"`
	Leases  []*TokenLease `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases,omitempty"`
	// contains filtered or unexported fields
}

Specifies tokens granted and their duration (may be empty if none granted)

func (*GetTokenLeaseResponse) Descriptor deprecated

func (*GetTokenLeaseResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetTokenLeaseResponse.ProtoReflect.Descriptor instead.

func (*GetTokenLeaseResponse) GetGranted

func (x *GetTokenLeaseResponse) GetGranted() bool

func (*GetTokenLeaseResponse) GetLeases

func (x *GetTokenLeaseResponse) GetLeases() []*TokenLease

func (*GetTokenLeaseResponse) ProtoMessage

func (*GetTokenLeaseResponse) ProtoMessage()

func (*GetTokenLeaseResponse) ProtoReflect

func (x *GetTokenLeaseResponse) ProtoReflect() protoreflect.Message

func (*GetTokenLeaseResponse) Reset

func (x *GetTokenLeaseResponse) Reset()

func (*GetTokenLeaseResponse) String

func (x *GetTokenLeaseResponse) String() string

type GetTokenRequest

type GetTokenRequest struct {

	// Only tags which are used for quota management should be included here - i.e. the list of quota_tags returned by the GetGuardConfig endpoint for this Guard. If tags are in use only one quota token will be issued at a time.
	Selector *GuardFeatureSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Used for tracking per-client token usage, allowing automatic determination of efficient batch leases. ID should be assigned by Stanza clients and be unique per-customer. Host or instance names may be used, or a UUID.
	ClientId *string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
	// Used to increase or decrease priority of request, relative to normal feature priority.
	PriorityBoost *int32 `protobuf:"varint,5,opt,name=priority_boost,json=priorityBoost,proto3,oneof" json:"priority_boost,omitempty"`
	// Used for request weighting, i.e. accounting for varying request sizes and costs. If not specified then a default value of 1 is used. In cases where weights/costs are not known upfront, users can send an initial estimate as the weight, and then later, when the exact cost is known, send an updated weight via the SetTokenLeaseConsumed rpc.
	//
	// weight is optional; if not used then it is assumed that all requests have weight of 1.
	Weight *float32 `protobuf:"fixed32,7,opt,name=weight,proto3,oneof" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

Requests token for given Guard at priority of specified feature.

func (*GetTokenRequest) Descriptor deprecated

func (*GetTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTokenRequest.ProtoReflect.Descriptor instead.

func (*GetTokenRequest) GetClientId

func (x *GetTokenRequest) GetClientId() string

func (*GetTokenRequest) GetPriorityBoost

func (x *GetTokenRequest) GetPriorityBoost() int32

func (*GetTokenRequest) GetSelector

func (x *GetTokenRequest) GetSelector() *GuardFeatureSelector

func (*GetTokenRequest) GetWeight

func (x *GetTokenRequest) GetWeight() float32

func (*GetTokenRequest) ProtoMessage

func (*GetTokenRequest) ProtoMessage()

func (*GetTokenRequest) ProtoReflect

func (x *GetTokenRequest) ProtoReflect() protoreflect.Message

func (*GetTokenRequest) Reset

func (x *GetTokenRequest) Reset()

func (*GetTokenRequest) String

func (x *GetTokenRequest) String() string

type GetTokenResponse

type GetTokenResponse struct {
	Granted bool    `protobuf:"varint,1,opt,name=granted,proto3" json:"granted,omitempty"`
	Token   *string `protobuf:"bytes,2,opt,name=token,proto3,oneof" json:"token,omitempty"`
	Reason  *Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=stanza.hub.v1.Reason,oneof" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

Specifies whether token granted.

func (*GetTokenResponse) Descriptor deprecated

func (*GetTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetTokenResponse.ProtoReflect.Descriptor instead.

func (*GetTokenResponse) GetGranted

func (x *GetTokenResponse) GetGranted() bool

func (*GetTokenResponse) GetReason

func (x *GetTokenResponse) GetReason() Reason

func (*GetTokenResponse) GetToken

func (x *GetTokenResponse) GetToken() string

func (*GetTokenResponse) ProtoMessage

func (*GetTokenResponse) ProtoMessage()

func (*GetTokenResponse) ProtoReflect

func (x *GetTokenResponse) ProtoReflect() protoreflect.Message

func (*GetTokenResponse) Reset

func (x *GetTokenResponse) Reset()

func (*GetTokenResponse) String

func (x *GetTokenResponse) String() string

type GetUsageRequest

type GetUsageRequest struct {

	// If specified, only stats relating to the tags and features in selector will be returned.
	//
	//	If only guard and environment are specified, then stats relating to all tags and features will be returned.
	Selector          *GuardSelector         `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	GuardQueryMode    *QueryMode             `` /* 141-byte string literal not displayed */
	StartTs           *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"`
	EndTs             *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_ts,json=endTs,proto3" json:"end_ts,omitempty"`
	Apikey            *string                `protobuf:"bytes,5,opt,name=apikey,proto3,oneof" json:"apikey,omitempty"`                      // Query for stats where this specific APIKey was used. If not specified then stats for all APIKeys are returned.
	ApikeyQueryMode   *QueryMode             ``                                                                                             /* 144-byte string literal not displayed */
	Feature           *string                `protobuf:"bytes,7,opt,name=feature,proto3,oneof" json:"feature,omitempty"`                    // Query for stats about a specific feature. If not specified then stats for all features are returned.
	FeatureQueryMode  *QueryMode             ``                                                                                             /* 147-byte string literal not displayed */
	Priority          *int32                 `protobuf:"varint,9,opt,name=priority,proto3,oneof" json:"priority,omitempty"`                 // Query for stats about a specific priority level. If not specified then stats for all priorities are returned.
	PriorityQueryMode *QueryMode             ``                                                                                             /* 151-byte string literal not displayed */
	ReportTags        []string               `protobuf:"bytes,11,rep,name=report_tags,json=reportTags,proto3" json:"report_tags,omitempty"` // Listed tags will be reported (individual timeseries returned for each value).
	Tags              []*Tag                 `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"`                               // Only stats relating to the specified tags will be returned.
	// contains filtered or unexported fields
}

Usage query.

func (*GetUsageRequest) Descriptor deprecated

func (*GetUsageRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetUsageRequest.ProtoReflect.Descriptor instead.

func (*GetUsageRequest) GetApikey

func (x *GetUsageRequest) GetApikey() string

func (*GetUsageRequest) GetApikeyQueryMode

func (x *GetUsageRequest) GetApikeyQueryMode() QueryMode

func (*GetUsageRequest) GetEndTs

func (x *GetUsageRequest) GetEndTs() *timestamppb.Timestamp

func (*GetUsageRequest) GetFeature

func (x *GetUsageRequest) GetFeature() string

func (*GetUsageRequest) GetFeatureQueryMode

func (x *GetUsageRequest) GetFeatureQueryMode() QueryMode

func (*GetUsageRequest) GetGuardQueryMode

func (x *GetUsageRequest) GetGuardQueryMode() QueryMode

func (*GetUsageRequest) GetPriority

func (x *GetUsageRequest) GetPriority() int32

func (*GetUsageRequest) GetPriorityQueryMode

func (x *GetUsageRequest) GetPriorityQueryMode() QueryMode

func (*GetUsageRequest) GetReportTags

func (x *GetUsageRequest) GetReportTags() []string

func (*GetUsageRequest) GetSelector

func (x *GetUsageRequest) GetSelector() *GuardSelector

func (*GetUsageRequest) GetStartTs

func (x *GetUsageRequest) GetStartTs() *timestamppb.Timestamp

func (*GetUsageRequest) GetTags

func (x *GetUsageRequest) GetTags() []*Tag

func (*GetUsageRequest) ProtoMessage

func (*GetUsageRequest) ProtoMessage()

func (*GetUsageRequest) ProtoReflect

func (x *GetUsageRequest) ProtoReflect() protoreflect.Message

func (*GetUsageRequest) Reset

func (x *GetUsageRequest) Reset()

func (*GetUsageRequest) String

func (x *GetUsageRequest) String() string

type GetUsageResponse

type GetUsageResponse struct {
	Result []*UsageTimeseries `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsageResponse) Descriptor deprecated

func (*GetUsageResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetUsageResponse.ProtoReflect.Descriptor instead.

func (*GetUsageResponse) GetResult

func (x *GetUsageResponse) GetResult() []*UsageTimeseries

func (*GetUsageResponse) ProtoMessage

func (*GetUsageResponse) ProtoMessage()

func (*GetUsageResponse) ProtoReflect

func (x *GetUsageResponse) ProtoReflect() protoreflect.Message

func (*GetUsageResponse) Reset

func (x *GetUsageResponse) Reset()

func (*GetUsageResponse) String

func (x *GetUsageResponse) String() string

type GuardConfig

type GuardConfig struct {
	ValidateIngressTokens bool `` // Boolean representing wether to validate contents of the X-Stanza-Token header.
	/* 127-byte string literal not displayed */
	// Quota
	CheckQuota bool     `protobuf:"varint,5,opt,name=check_quota,json=checkQuota,proto3" json:"check_quota,omitempty"` // Boolean representing whether quota checks are enabled.
	QuotaTags  []string `protobuf:"bytes,6,rep,name=quota_tags,json=quotaTags,proto3" json:"quota_tags,omitempty"`     // The set of tags which are used for quota management. For example, a 'customer_id' tag might be used to implement per-customer quota limits. Only the tags listed here should be included in GetToken and GetTokenLease requests.
	// contains filtered or unexported fields
}

GuardConfig represents a configuration for a given Stanza SDK instrumented Guard, which may be used by multiple services! If check_quota is false, then no ratelimiting will be performed. All quota requests will succeed and the SDK may short-circuit quota requests, i.e. not call Hub for quota. At a later point, there will be additional per-Guard configuration, such as deadline overrides, adaptive circuitbreaking configs, etc.

func (*GuardConfig) Descriptor deprecated

func (*GuardConfig) Descriptor() ([]byte, []int)

Deprecated: Use GuardConfig.ProtoReflect.Descriptor instead.

func (*GuardConfig) GetCheckQuota

func (x *GuardConfig) GetCheckQuota() bool

func (*GuardConfig) GetQuotaTags

func (x *GuardConfig) GetQuotaTags() []string

func (*GuardConfig) GetValidateIngressTokens

func (x *GuardConfig) GetValidateIngressTokens() bool

func (*GuardConfig) ProtoMessage

func (*GuardConfig) ProtoMessage()

func (*GuardConfig) ProtoReflect

func (x *GuardConfig) ProtoReflect() protoreflect.Message

func (*GuardConfig) Reset

func (x *GuardConfig) Reset()

func (*GuardConfig) String

func (x *GuardConfig) String() string

type GuardFeatureSelector

type GuardFeatureSelector struct {
	Environment string  `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	GuardName   string  `protobuf:"bytes,2,opt,name=guard_name,json=guardName,proto3" json:"guard_name,omitempty"`
	FeatureName *string `protobuf:"bytes,3,opt,name=feature_name,json=featureName,proto3,oneof" json:"feature_name,omitempty"`
	Tags        []*Tag  `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*GuardFeatureSelector) Descriptor deprecated

func (*GuardFeatureSelector) Descriptor() ([]byte, []int)

Deprecated: Use GuardFeatureSelector.ProtoReflect.Descriptor instead.

func (*GuardFeatureSelector) GetEnvironment

func (x *GuardFeatureSelector) GetEnvironment() string

func (*GuardFeatureSelector) GetFeatureName

func (x *GuardFeatureSelector) GetFeatureName() string

func (*GuardFeatureSelector) GetGuardName

func (x *GuardFeatureSelector) GetGuardName() string

func (*GuardFeatureSelector) GetTags

func (x *GuardFeatureSelector) GetTags() []*Tag

func (*GuardFeatureSelector) ProtoMessage

func (*GuardFeatureSelector) ProtoMessage()

func (*GuardFeatureSelector) ProtoReflect

func (x *GuardFeatureSelector) ProtoReflect() protoreflect.Message

func (*GuardFeatureSelector) Reset

func (x *GuardFeatureSelector) Reset()

func (*GuardFeatureSelector) String

func (x *GuardFeatureSelector) String() string

type GuardSelector

type GuardSelector struct {
	Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Tags        []*Tag `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*GuardSelector) Descriptor deprecated

func (*GuardSelector) Descriptor() ([]byte, []int)

Deprecated: Use GuardSelector.ProtoReflect.Descriptor instead.

func (*GuardSelector) GetEnvironment

func (x *GuardSelector) GetEnvironment() string

func (*GuardSelector) GetName

func (x *GuardSelector) GetName() string

func (*GuardSelector) GetTags

func (x *GuardSelector) GetTags() []*Tag

func (*GuardSelector) ProtoMessage

func (*GuardSelector) ProtoMessage()

func (*GuardSelector) ProtoReflect

func (x *GuardSelector) ProtoReflect() protoreflect.Message

func (*GuardSelector) Reset

func (x *GuardSelector) Reset()

func (*GuardSelector) String

func (x *GuardSelector) String() string

type GuardServiceSelector

type GuardServiceSelector struct {
	Environment    string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	GuardName      string `protobuf:"bytes,2,opt,name=guard_name,json=guardName,proto3" json:"guard_name,omitempty"`
	ServiceName    string `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	ServiceRelease string `protobuf:"bytes,4,opt,name=service_release,json=serviceRelease,proto3" json:"service_release,omitempty"`
	Tags           []*Tag `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*GuardServiceSelector) Descriptor deprecated

func (*GuardServiceSelector) Descriptor() ([]byte, []int)

Deprecated: Use GuardServiceSelector.ProtoReflect.Descriptor instead.

func (*GuardServiceSelector) GetEnvironment

func (x *GuardServiceSelector) GetEnvironment() string

func (*GuardServiceSelector) GetGuardName

func (x *GuardServiceSelector) GetGuardName() string

func (*GuardServiceSelector) GetServiceName

func (x *GuardServiceSelector) GetServiceName() string

func (*GuardServiceSelector) GetServiceRelease

func (x *GuardServiceSelector) GetServiceRelease() string

func (*GuardServiceSelector) GetTags

func (x *GuardServiceSelector) GetTags() []*Tag

func (*GuardServiceSelector) ProtoMessage

func (*GuardServiceSelector) ProtoMessage()

func (*GuardServiceSelector) ProtoReflect

func (x *GuardServiceSelector) ProtoReflect() protoreflect.Message

func (*GuardServiceSelector) Reset

func (x *GuardServiceSelector) Reset()

func (*GuardServiceSelector) String

func (x *GuardServiceSelector) String() string

type HeaderTraceConfig

type HeaderTraceConfig struct {
	SpanSelectors       []*SpanSelector `protobuf:"bytes,1,rep,name=span_selectors,json=spanSelectors,proto3" json:"span_selectors,omitempty"`                     // If no selectors specified then config is applied to all requests
	RequestHeaderNames  []string        `protobuf:"bytes,2,rep,name=request_header_names,json=requestHeaderNames,proto3" json:"request_header_names,omitempty"`    // Names of headers to collect
	ResponseHeaderNames []string        `protobuf:"bytes,3,rep,name=response_header_names,json=responseHeaderNames,proto3" json:"response_header_names,omitempty"` // Names of headers to collect
	// contains filtered or unexported fields
}

Specifies which headers should be sampled - required by OTel spec.

func (*HeaderTraceConfig) Descriptor deprecated

func (*HeaderTraceConfig) Descriptor() ([]byte, []int)

Deprecated: Use HeaderTraceConfig.ProtoReflect.Descriptor instead.

func (*HeaderTraceConfig) GetRequestHeaderNames

func (x *HeaderTraceConfig) GetRequestHeaderNames() []string

func (*HeaderTraceConfig) GetResponseHeaderNames

func (x *HeaderTraceConfig) GetResponseHeaderNames() []string

func (*HeaderTraceConfig) GetSpanSelectors

func (x *HeaderTraceConfig) GetSpanSelectors() []*SpanSelector

func (*HeaderTraceConfig) ProtoMessage

func (*HeaderTraceConfig) ProtoMessage()

func (*HeaderTraceConfig) ProtoReflect

func (x *HeaderTraceConfig) ProtoReflect() protoreflect.Message

func (*HeaderTraceConfig) Reset

func (x *HeaderTraceConfig) Reset()

func (*HeaderTraceConfig) String

func (x *HeaderTraceConfig) String() string

type Health

type Health int32
const (
	Health_HEALTH_UNSPECIFIED Health = 0
	Health_HEALTH_OK          Health = 1
	Health_HEALTH_OVERLOAD    Health = 2
	Health_HEALTH_DOWN        Health = 3
)

func (Health) Descriptor

func (Health) Descriptor() protoreflect.EnumDescriptor

func (Health) Enum

func (x Health) Enum() *Health

func (Health) EnumDescriptor deprecated

func (Health) EnumDescriptor() ([]byte, []int)

Deprecated: Use Health.Descriptor instead.

func (Health) Number

func (x Health) Number() protoreflect.EnumNumber

func (Health) String

func (x Health) String() string

func (Health) Type

func (Health) Type() protoreflect.EnumType

type HealthByPriority

type HealthByPriority struct {
	Priority uint32 `protobuf:"varint,1,opt,name=priority,proto3" json:"priority,omitempty"`
	Health   Health `protobuf:"varint,2,opt,name=health,proto3,enum=stanza.hub.v1.Health" json:"health,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthByPriority) Descriptor deprecated

func (*HealthByPriority) Descriptor() ([]byte, []int)

Deprecated: Use HealthByPriority.ProtoReflect.Descriptor instead.

func (*HealthByPriority) GetHealth

func (x *HealthByPriority) GetHealth() Health

func (*HealthByPriority) GetPriority

func (x *HealthByPriority) GetPriority() uint32

func (*HealthByPriority) ProtoMessage

func (*HealthByPriority) ProtoMessage()

func (*HealthByPriority) ProtoReflect

func (x *HealthByPriority) ProtoReflect() protoreflect.Message

func (*HealthByPriority) Reset

func (x *HealthByPriority) Reset()

func (*HealthByPriority) String

func (x *HealthByPriority) String() string

type HealthServiceClient

type HealthServiceClient interface {
	QueryGuardHealth(ctx context.Context, in *QueryGuardHealthRequest, opts ...grpc.CallOption) (*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.

type HealthServiceServer

type HealthServiceServer interface {
	QueryGuardHealth(context.Context, *QueryGuardHealthRequest) (*QueryGuardHealthResponse, error)
}

HealthServiceServer is the server API for HealthService service. All implementations should embed UnimplementedHealthServiceServer for forward compatibility

type MetricConfig

type MetricConfig struct {
	CollectorUrl *string `protobuf:"bytes,1,opt,name=collector_url,json=collectorUrl,proto3,oneof" json:"collector_url,omitempty"` // URL of OTEL metric collector. If URL begins with http or https it will be treated as an HTTP collector, otherwise it will be treated as a gRPC collector.
	// contains filtered or unexported fields
}

func (*MetricConfig) Descriptor deprecated

func (*MetricConfig) Descriptor() ([]byte, []int)

Deprecated: Use MetricConfig.ProtoReflect.Descriptor instead.

func (*MetricConfig) GetCollectorUrl

func (x *MetricConfig) GetCollectorUrl() string

func (*MetricConfig) ProtoMessage

func (*MetricConfig) ProtoMessage()

func (*MetricConfig) ProtoReflect

func (x *MetricConfig) ProtoReflect() protoreflect.Message

func (*MetricConfig) Reset

func (x *MetricConfig) Reset()

func (*MetricConfig) String

func (x *MetricConfig) String() string

type ParamTraceConfig

type ParamTraceConfig struct {
	SpanSelectors  []*SpanSelector `protobuf:"bytes,1,rep,name=span_selectors,json=spanSelectors,proto3" json:"span_selectors,omitempty"`    // If no selectors specified then config is applied to all requests
	ParameterNames []string        `protobuf:"bytes,2,rep,name=parameter_names,json=parameterNames,proto3" json:"parameter_names,omitempty"` // Names of parameters to collect
	// contains filtered or unexported fields
}

Specifies which request parameters should be sampled.

func (*ParamTraceConfig) Descriptor deprecated

func (*ParamTraceConfig) Descriptor() ([]byte, []int)

Deprecated: Use ParamTraceConfig.ProtoReflect.Descriptor instead.

func (*ParamTraceConfig) GetParameterNames

func (x *ParamTraceConfig) GetParameterNames() []string

func (*ParamTraceConfig) GetSpanSelectors

func (x *ParamTraceConfig) GetSpanSelectors() []*SpanSelector

func (*ParamTraceConfig) ProtoMessage

func (*ParamTraceConfig) ProtoMessage()

func (*ParamTraceConfig) ProtoReflect

func (x *ParamTraceConfig) ProtoReflect() protoreflect.Message

func (*ParamTraceConfig) Reset

func (x *ParamTraceConfig) Reset()

func (*ParamTraceConfig) String

func (x *ParamTraceConfig) String() string

type QueryGuardHealthRequest

type QueryGuardHealthRequest struct {

	// Only tags which are used for quota management should be included here - i.e. the list of quota_tags returned by the GetGuardConfig endpoint for this Guard. If tags are in use only one quota token will be issued at a time.
	Selector *GuardFeatureSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Required: GuardName, featureName, environment
	// Used to boost priority - SDK can increase or decrease priority of request, relative to normal feature priority. For instance, a customer may wish to boost the priority of paid user traffic over free tier. Priority boosts may also be negative - for example, one might deprioritise bot traffic.
	PriorityBoost *int32 `protobuf:"varint,4,opt,name=priority_boost,json=priorityBoost,proto3,oneof" json:"priority_boost,omitempty"`
	// contains filtered or unexported fields
}

Called by SDK to determine whether a Guard is overloaded at a given Feature's priority level. Used so that customer code can make good decisions about fail-fast or graceful degradation as high up the stack as possible. SDK may cache the result for up to 10 seconds.

func (*QueryGuardHealthRequest) Descriptor deprecated

func (*QueryGuardHealthRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryGuardHealthRequest.ProtoReflect.Descriptor instead.

func (*QueryGuardHealthRequest) GetPriorityBoost

func (x *QueryGuardHealthRequest) GetPriorityBoost() int32

func (*QueryGuardHealthRequest) GetSelector

func (*QueryGuardHealthRequest) ProtoMessage

func (*QueryGuardHealthRequest) ProtoMessage()

func (*QueryGuardHealthRequest) ProtoReflect

func (x *QueryGuardHealthRequest) ProtoReflect() protoreflect.Message

func (*QueryGuardHealthRequest) Reset

func (x *QueryGuardHealthRequest) Reset()

func (*QueryGuardHealthRequest) String

func (x *QueryGuardHealthRequest) String() string

type QueryGuardHealthResponse

type QueryGuardHealthResponse struct {
	Health Health `protobuf:"varint,1,opt,name=health,proto3,enum=stanza.hub.v1.Health" json:"health,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryGuardHealthResponse) Descriptor deprecated

func (*QueryGuardHealthResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryGuardHealthResponse.ProtoReflect.Descriptor instead.

func (*QueryGuardHealthResponse) GetHealth

func (x *QueryGuardHealthResponse) GetHealth() Health

func (*QueryGuardHealthResponse) ProtoMessage

func (*QueryGuardHealthResponse) ProtoMessage()

func (*QueryGuardHealthResponse) ProtoReflect

func (x *QueryGuardHealthResponse) ProtoReflect() protoreflect.Message

func (*QueryGuardHealthResponse) Reset

func (x *QueryGuardHealthResponse) Reset()

func (*QueryGuardHealthResponse) String

func (x *QueryGuardHealthResponse) String() string

type QueryMode

type QueryMode int32

MODE_SUM: query results across various axes (features, tags, apikeys) are added up and one timeseries is returned. MODE_REPORT: individual timeseries are returned for specified query axes. If not specified then queries will default to MODE_SUM for all axes.

const (
	QueryMode_QUERY_MODE_UNSPECIFIED QueryMode = 0
	QueryMode_QUERY_MODE_SUM         QueryMode = 1
	QueryMode_QUERY_MODE_REPORT      QueryMode = 2
)

func (QueryMode) Descriptor

func (QueryMode) Descriptor() protoreflect.EnumDescriptor

func (QueryMode) Enum

func (x QueryMode) Enum() *QueryMode

func (QueryMode) EnumDescriptor deprecated

func (QueryMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use QueryMode.Descriptor instead.

func (QueryMode) Number

func (x QueryMode) Number() protoreflect.EnumNumber

func (QueryMode) String

func (x QueryMode) String() string

func (QueryMode) Type

type QuotaServiceClient

type QuotaServiceClient interface {
	GetToken(ctx context.Context, in *GetTokenRequest, opts ...grpc.CallOption) (*GetTokenResponse, error)
	GetTokenLease(ctx context.Context, in *GetTokenLeaseRequest, opts ...grpc.CallOption) (*GetTokenLeaseResponse, error)
	SetTokenLeaseConsumed(ctx context.Context, in *SetTokenLeaseConsumedRequest, opts ...grpc.CallOption) (*SetTokenLeaseConsumedResponse, error)
	// Used by ingress Guards to validate Hub-generated tokens.
	ValidateToken(ctx context.Context, in *ValidateTokenRequest, opts ...grpc.CallOption) (*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.

type QuotaServiceServer

type QuotaServiceServer interface {
	GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error)
	GetTokenLease(context.Context, *GetTokenLeaseRequest) (*GetTokenLeaseResponse, error)
	SetTokenLeaseConsumed(context.Context, *SetTokenLeaseConsumedRequest) (*SetTokenLeaseConsumedResponse, error)
	// Used by ingress Guards to validate Hub-generated tokens.
	ValidateToken(context.Context, *ValidateTokenRequest) (*ValidateTokenResponse, error)
}

QuotaServiceServer is the server API for QuotaService service. All implementations should embed UnimplementedQuotaServiceServer for forward compatibility

type Reason

type Reason int32
const (
	Reason_REASON_UNSPECIFIED               Reason = 0
	Reason_REASON_SUFFICIENT_QUOTA          Reason = 1
	Reason_REASON_INSUFFICIENT_QUOTA        Reason = 2
	Reason_REASON_INSUFFICIENT_QUOTA_PARENT Reason = 3
	Reason_REASON_BURST                     Reason = 4
	Reason_REASON_BEST_EFFORT               Reason = 5
)

func (Reason) Descriptor

func (Reason) Descriptor() protoreflect.EnumDescriptor

func (Reason) Enum

func (x Reason) Enum() *Reason

func (Reason) EnumDescriptor deprecated

func (Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use Reason.Descriptor instead.

func (Reason) Number

func (x Reason) Number() protoreflect.EnumNumber

func (Reason) String

func (x Reason) String() string

func (Reason) Type

func (Reason) Type() protoreflect.EnumType

type SentinelConfig

type SentinelConfig struct {
	CircuitbreakerRulesJson *string `` /* 138-byte string literal not displayed */
	FlowRulesJson           *string `protobuf:"bytes,2,opt,name=flow_rules_json,json=flowRulesJson,proto3,oneof" json:"flow_rules_json,omitempty"`
	IsolationRulesJson      *string `protobuf:"bytes,3,opt,name=isolation_rules_json,json=isolationRulesJson,proto3,oneof" json:"isolation_rules_json,omitempty"`
	SystemRulesJson         *string `protobuf:"bytes,4,opt,name=system_rules_json,json=systemRulesJson,proto3,oneof" json:"system_rules_json,omitempty"`
	// contains filtered or unexported fields
}

SentinelConfig represents Sentinel compliant JSON configuration for the given Sentinel types. These rules are "per service" (not per Guard) with Guard specific routing encoded in the given JSON blobs (as Sentinel "Resources").

func (*SentinelConfig) Descriptor deprecated

func (*SentinelConfig) Descriptor() ([]byte, []int)

Deprecated: Use SentinelConfig.ProtoReflect.Descriptor instead.

func (*SentinelConfig) GetCircuitbreakerRulesJson

func (x *SentinelConfig) GetCircuitbreakerRulesJson() string

func (*SentinelConfig) GetFlowRulesJson

func (x *SentinelConfig) GetFlowRulesJson() string

func (*SentinelConfig) GetIsolationRulesJson

func (x *SentinelConfig) GetIsolationRulesJson() string

func (*SentinelConfig) GetSystemRulesJson

func (x *SentinelConfig) GetSystemRulesJson() string

func (*SentinelConfig) ProtoMessage

func (*SentinelConfig) ProtoMessage()

func (*SentinelConfig) ProtoReflect

func (x *SentinelConfig) ProtoReflect() protoreflect.Message

func (*SentinelConfig) Reset

func (x *SentinelConfig) Reset()

func (*SentinelConfig) String

func (x *SentinelConfig) String() string

type ServiceConfig

type ServiceConfig struct {
	CustomerId     *string         `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3,oneof" json:"customer_id,omitempty"`
	TraceConfig    *TraceConfig    `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3,oneof" json:"trace_config,omitempty"`
	MetricConfig   *MetricConfig   `protobuf:"bytes,4,opt,name=metric_config,json=metricConfig,proto3,oneof" json:"metric_config,omitempty"`
	SentinelConfig *SentinelConfig `protobuf:"bytes,5,opt,name=sentinel_config,json=sentinelConfig,proto3,oneof" json:"sentinel_config,omitempty"`
	// contains filtered or unexported fields
}

ServiceConfig represents a configuration for a given Stanza SDK instrumented service.

func (*ServiceConfig) Descriptor deprecated

func (*ServiceConfig) Descriptor() ([]byte, []int)

Deprecated: Use ServiceConfig.ProtoReflect.Descriptor instead.

func (*ServiceConfig) GetCustomerId

func (x *ServiceConfig) GetCustomerId() string

func (*ServiceConfig) GetMetricConfig

func (x *ServiceConfig) GetMetricConfig() *MetricConfig

func (*ServiceConfig) GetSentinelConfig

func (x *ServiceConfig) GetSentinelConfig() *SentinelConfig

func (*ServiceConfig) GetTraceConfig

func (x *ServiceConfig) GetTraceConfig() *TraceConfig

func (*ServiceConfig) ProtoMessage

func (*ServiceConfig) ProtoMessage()

func (*ServiceConfig) ProtoReflect

func (x *ServiceConfig) ProtoReflect() protoreflect.Message

func (*ServiceConfig) Reset

func (x *ServiceConfig) Reset()

func (*ServiceConfig) String

func (x *ServiceConfig) String() string

type ServiceSelector

type ServiceSelector struct {
	Environment string  `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	Name        string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Release     *string `protobuf:"bytes,3,opt,name=release,proto3,oneof" json:"release,omitempty"`
	Tags        []*Tag  `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceSelector) Descriptor deprecated

func (*ServiceSelector) Descriptor() ([]byte, []int)

Deprecated: Use ServiceSelector.ProtoReflect.Descriptor instead.

func (*ServiceSelector) GetEnvironment

func (x *ServiceSelector) GetEnvironment() string

func (*ServiceSelector) GetName

func (x *ServiceSelector) GetName() string

func (*ServiceSelector) GetRelease

func (x *ServiceSelector) GetRelease() string

func (*ServiceSelector) GetTags

func (x *ServiceSelector) GetTags() []*Tag

func (*ServiceSelector) ProtoMessage

func (*ServiceSelector) ProtoMessage()

func (*ServiceSelector) ProtoReflect

func (x *ServiceSelector) ProtoReflect() protoreflect.Message

func (*ServiceSelector) Reset

func (x *ServiceSelector) Reset()

func (*ServiceSelector) String

func (x *ServiceSelector) String() string

type SetTokenLeaseConsumedRequest

type SetTokenLeaseConsumedRequest struct {
	Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// Used for request weighting, i.e. accounting for varying request sizes and costs. If weights are not known before request execution, then a default or estimated weight may be used, followed by a corrected value here. If a value is sent here, it should be the actual request weight.
	WeightCorrection *float32 `protobuf:"fixed32,2,opt,name=weight_correction,json=weightCorrection,proto3,oneof" json:"weight_correction,omitempty"`
	// contains filtered or unexported fields
}

Notifies Hub that one or more token leases has been used, i.e. Guard has been exercised.

func (*SetTokenLeaseConsumedRequest) Descriptor deprecated

func (*SetTokenLeaseConsumedRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetTokenLeaseConsumedRequest.ProtoReflect.Descriptor instead.

func (*SetTokenLeaseConsumedRequest) GetTokens

func (x *SetTokenLeaseConsumedRequest) GetTokens() []string

func (*SetTokenLeaseConsumedRequest) GetWeightCorrection

func (x *SetTokenLeaseConsumedRequest) GetWeightCorrection() float32

func (*SetTokenLeaseConsumedRequest) ProtoMessage

func (*SetTokenLeaseConsumedRequest) ProtoMessage()

func (*SetTokenLeaseConsumedRequest) ProtoReflect

func (*SetTokenLeaseConsumedRequest) Reset

func (x *SetTokenLeaseConsumedRequest) Reset()

func (*SetTokenLeaseConsumedRequest) String

type SetTokenLeaseConsumedResponse

type SetTokenLeaseConsumedResponse struct {
	// contains filtered or unexported fields
}

No message contents yet

func (*SetTokenLeaseConsumedResponse) Descriptor deprecated

func (*SetTokenLeaseConsumedResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetTokenLeaseConsumedResponse.ProtoReflect.Descriptor instead.

func (*SetTokenLeaseConsumedResponse) ProtoMessage

func (*SetTokenLeaseConsumedResponse) ProtoMessage()

func (*SetTokenLeaseConsumedResponse) ProtoReflect

func (*SetTokenLeaseConsumedResponse) Reset

func (x *SetTokenLeaseConsumedResponse) Reset()

func (*SetTokenLeaseConsumedResponse) String

type SpanSelector

type SpanSelector struct {

	// OTel attribute, e.g. peer.service, status, http.status_code. See:
	// https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/span-general/
	// https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/
	OtelAttribute string `protobuf:"bytes,1,opt,name=otel_attribute,json=otelAttribute,proto3" json:"otel_attribute,omitempty"`
	Value         string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Selector matches if value of 'otel_attribute' equals 'value'.
	// contains filtered or unexported fields
}

func (*SpanSelector) Descriptor deprecated

func (*SpanSelector) Descriptor() ([]byte, []int)

Deprecated: Use SpanSelector.ProtoReflect.Descriptor instead.

func (*SpanSelector) GetOtelAttribute

func (x *SpanSelector) GetOtelAttribute() string

func (*SpanSelector) GetValue

func (x *SpanSelector) GetValue() string

func (*SpanSelector) ProtoMessage

func (*SpanSelector) ProtoMessage()

func (*SpanSelector) ProtoReflect

func (x *SpanSelector) ProtoReflect() protoreflect.Message

func (*SpanSelector) Reset

func (x *SpanSelector) Reset()

func (*SpanSelector) String

func (x *SpanSelector) String() string

type State

type State int32
const (
	State_STATE_UNSPECIFIED State = 0
	State_STATE_ENABLED     State = 1
	State_STATE_DISABLED    State = 2
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

func (State) EnumDescriptor() ([]byte, []int)

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

type Tag

type Tag struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Tag) Descriptor deprecated

func (*Tag) Descriptor() ([]byte, []int)

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetKey

func (x *Tag) GetKey() string

func (*Tag) GetValue

func (x *Tag) GetValue() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

func (x *Tag) ProtoReflect() protoreflect.Message

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type TokenInfo

type TokenInfo struct {
	Token string         `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Guard *GuardSelector `protobuf:"bytes,2,opt,name=guard,proto3" json:"guard,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenInfo) Descriptor deprecated

func (*TokenInfo) Descriptor() ([]byte, []int)

Deprecated: Use TokenInfo.ProtoReflect.Descriptor instead.

func (*TokenInfo) GetGuard

func (x *TokenInfo) GetGuard() *GuardSelector

func (*TokenInfo) GetToken

func (x *TokenInfo) GetToken() string

func (*TokenInfo) ProtoMessage

func (*TokenInfo) ProtoMessage()

func (*TokenInfo) ProtoReflect

func (x *TokenInfo) ProtoReflect() protoreflect.Message

func (*TokenInfo) Reset

func (x *TokenInfo) Reset()

func (*TokenInfo) String

func (x *TokenInfo) String() string

type TokenLease

type TokenLease struct {
	DurationMsec  int32                  `protobuf:"varint,1,opt,name=duration_msec,json=durationMsec,proto3" json:"duration_msec,omitempty"` // How long until lease expires, in milliseconds
	Token         string                 `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Feature       string                 `protobuf:"bytes,3,opt,name=feature,proto3" json:"feature,omitempty"`
	PriorityBoost int32                  `protobuf:"varint,4,opt,name=priority_boost,json=priorityBoost,proto3" json:"priority_boost,omitempty"`
	Weight        float32                `protobuf:"fixed32,5,opt,name=weight,proto3" json:"weight,omitempty"`
	Reason        Reason                 `protobuf:"varint,6,opt,name=reason,proto3,enum=stanza.hub.v1.Reason" json:"reason,omitempty"`
	ExpiresAt     *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` // If nil expiration should be calculated as time you received the lease + duration_msec
	// contains filtered or unexported fields
}

func (*TokenLease) Descriptor deprecated

func (*TokenLease) Descriptor() ([]byte, []int)

Deprecated: Use TokenLease.ProtoReflect.Descriptor instead.

func (*TokenLease) GetDurationMsec

func (x *TokenLease) GetDurationMsec() int32

func (*TokenLease) GetExpiresAt

func (x *TokenLease) GetExpiresAt() *timestamppb.Timestamp

func (*TokenLease) GetFeature

func (x *TokenLease) GetFeature() string

func (*TokenLease) GetPriorityBoost

func (x *TokenLease) GetPriorityBoost() int32

func (*TokenLease) GetReason

func (x *TokenLease) GetReason() Reason

func (*TokenLease) GetToken

func (x *TokenLease) GetToken() string

func (*TokenLease) GetWeight

func (x *TokenLease) GetWeight() float32

func (*TokenLease) ProtoMessage

func (*TokenLease) ProtoMessage()

func (*TokenLease) ProtoReflect

func (x *TokenLease) ProtoReflect() protoreflect.Message

func (*TokenLease) Reset

func (x *TokenLease) Reset()

func (*TokenLease) String

func (x *TokenLease) String() string

type TokenValid

type TokenValid struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Valid bool   `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenValid) Descriptor deprecated

func (*TokenValid) Descriptor() ([]byte, []int)

Deprecated: Use TokenValid.ProtoReflect.Descriptor instead.

func (*TokenValid) GetToken

func (x *TokenValid) GetToken() string

func (*TokenValid) GetValid

func (x *TokenValid) GetValid() bool

func (*TokenValid) ProtoMessage

func (*TokenValid) ProtoMessage()

func (*TokenValid) ProtoReflect

func (x *TokenValid) ProtoReflect() protoreflect.Message

func (*TokenValid) Reset

func (x *TokenValid) Reset()

func (*TokenValid) String

func (x *TokenValid) String() string

type TraceConfig

type TraceConfig struct {
	CollectorUrl        *string                `protobuf:"bytes,1,opt,name=collector_url,json=collectorUrl,proto3,oneof" json:"collector_url,omitempty"`                    // URL of OTEL trace collector. If URL begins with http or https it will be treated as an HTTP collector, otherwise it will be treated as a gRPC collector.
	SampleRateDefault   *float32               `protobuf:"fixed32,3,opt,name=sample_rate_default,json=sampleRateDefault,proto3,oneof" json:"sample_rate_default,omitempty"` // default base sampling rate
	Overrides           []*TraceConfigOverride `protobuf:"bytes,4,rep,name=overrides,proto3" json:"overrides,omitempty"`                                                    // span sampling rate overrides
	HeaderSampleConfigs []*HeaderTraceConfig   `protobuf:"bytes,5,rep,name=header_sample_configs,json=headerSampleConfigs,proto3" json:"header_sample_configs,omitempty"`   // which headers to capture
	ParamSampleConfigs  []*ParamTraceConfig    `protobuf:"bytes,6,rep,name=param_sample_configs,json=paramSampleConfigs,proto3" json:"param_sample_configs,omitempty"`      // which parameters to capture
	// contains filtered or unexported fields
}

func (*TraceConfig) Descriptor deprecated

func (*TraceConfig) Descriptor() ([]byte, []int)

Deprecated: Use TraceConfig.ProtoReflect.Descriptor instead.

func (*TraceConfig) GetCollectorUrl

func (x *TraceConfig) GetCollectorUrl() string

func (*TraceConfig) GetHeaderSampleConfigs

func (x *TraceConfig) GetHeaderSampleConfigs() []*HeaderTraceConfig

func (*TraceConfig) GetOverrides

func (x *TraceConfig) GetOverrides() []*TraceConfigOverride

func (*TraceConfig) GetParamSampleConfigs

func (x *TraceConfig) GetParamSampleConfigs() []*ParamTraceConfig

func (*TraceConfig) GetSampleRateDefault

func (x *TraceConfig) GetSampleRateDefault() float32

func (*TraceConfig) ProtoMessage

func (*TraceConfig) ProtoMessage()

func (*TraceConfig) ProtoReflect

func (x *TraceConfig) ProtoReflect() protoreflect.Message

func (*TraceConfig) Reset

func (x *TraceConfig) Reset()

func (*TraceConfig) String

func (x *TraceConfig) String() string

type TraceConfigOverride

type TraceConfigOverride struct {
	SampleRate    float32         `protobuf:"fixed32,1,opt,name=sample_rate,json=sampleRate,proto3" json:"sample_rate,omitempty"`
	SpanSelectors []*SpanSelector `protobuf:"bytes,2,rep,name=span_selectors,json=spanSelectors,proto3" json:"span_selectors,omitempty"`
	// contains filtered or unexported fields
}

This configuration allows different sample rates to be applied to selected spans.

func (*TraceConfigOverride) Descriptor deprecated

func (*TraceConfigOverride) Descriptor() ([]byte, []int)

Deprecated: Use TraceConfigOverride.ProtoReflect.Descriptor instead.

func (*TraceConfigOverride) GetSampleRate

func (x *TraceConfigOverride) GetSampleRate() float32

func (*TraceConfigOverride) GetSpanSelectors

func (x *TraceConfigOverride) GetSpanSelectors() []*SpanSelector

func (*TraceConfigOverride) ProtoMessage

func (*TraceConfigOverride) ProtoMessage()

func (*TraceConfigOverride) ProtoReflect

func (x *TraceConfigOverride) ProtoReflect() protoreflect.Message

func (*TraceConfigOverride) Reset

func (x *TraceConfigOverride) Reset()

func (*TraceConfigOverride) String

func (x *TraceConfigOverride) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) GetBearerToken

type UnimplementedConfigServiceServer

type UnimplementedConfigServiceServer struct {
}

UnimplementedConfigServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedConfigServiceServer) GetBrowserContext

func (UnimplementedConfigServiceServer) GetGuardConfig

func (UnimplementedConfigServiceServer) GetServiceConfig

type UnimplementedHealthServiceServer

type UnimplementedHealthServiceServer struct {
}

UnimplementedHealthServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedHealthServiceServer) QueryGuardHealth

type UnimplementedQuotaServiceServer

type UnimplementedQuotaServiceServer struct {
}

UnimplementedQuotaServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedQuotaServiceServer) GetToken

func (UnimplementedQuotaServiceServer) GetTokenLease

func (UnimplementedQuotaServiceServer) ValidateToken

type UnimplementedUsageServiceServer

type UnimplementedUsageServiceServer struct {
}

UnimplementedUsageServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedUsageServiceServer) GetUsage

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 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 *GetUsageRequest, opts ...grpc.CallOption) (*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.

type UsageServiceServer

type UsageServiceServer interface {
	GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
}

UsageServiceServer is the server API for UsageService service. All implementations should embed UnimplementedUsageServiceServer for forward compatibility

type UsageTSDataPoint

type UsageTSDataPoint struct {
	StartTs            *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"`
	EndTs              *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_ts,json=endTs,proto3" json:"end_ts,omitempty"`
	Granted            int32                  `protobuf:"varint,3,opt,name=granted,proto3" json:"granted,omitempty"`
	GrantedWeight      float32                `protobuf:"fixed32,4,opt,name=granted_weight,json=grantedWeight,proto3" json:"granted_weight,omitempty"`
	NotGranted         int32                  `protobuf:"varint,5,opt,name=not_granted,json=notGranted,proto3" json:"not_granted,omitempty"`
	NotGrantedWeight   float32                `protobuf:"fixed32,6,opt,name=not_granted_weight,json=notGrantedWeight,proto3" json:"not_granted_weight,omitempty"`
	BeBurst            *int32                 `protobuf:"varint,7,opt,name=be_burst,json=beBurst,proto3,oneof" json:"be_burst,omitempty"`
	BeBurstWeight      *float32               `protobuf:"fixed32,8,opt,name=be_burst_weight,json=beBurstWeight,proto3,oneof" json:"be_burst_weight,omitempty"`
	ParentReject       *int32                 `protobuf:"varint,9,opt,name=parent_reject,json=parentReject,proto3,oneof" json:"parent_reject,omitempty"`
	ParentRejectWeight *float32               `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UsageTSDataPoint) Descriptor deprecated

func (*UsageTSDataPoint) Descriptor() ([]byte, []int)

Deprecated: Use UsageTSDataPoint.ProtoReflect.Descriptor instead.

func (*UsageTSDataPoint) GetBeBurst

func (x *UsageTSDataPoint) GetBeBurst() int32

func (*UsageTSDataPoint) GetBeBurstWeight

func (x *UsageTSDataPoint) GetBeBurstWeight() float32

func (*UsageTSDataPoint) GetEndTs

func (x *UsageTSDataPoint) GetEndTs() *timestamppb.Timestamp

func (*UsageTSDataPoint) GetGranted

func (x *UsageTSDataPoint) GetGranted() int32

func (*UsageTSDataPoint) GetGrantedWeight

func (x *UsageTSDataPoint) GetGrantedWeight() float32

func (*UsageTSDataPoint) GetNotGranted

func (x *UsageTSDataPoint) GetNotGranted() int32

func (*UsageTSDataPoint) GetNotGrantedWeight

func (x *UsageTSDataPoint) GetNotGrantedWeight() float32

func (*UsageTSDataPoint) GetParentReject

func (x *UsageTSDataPoint) GetParentReject() int32

func (*UsageTSDataPoint) GetParentRejectWeight

func (x *UsageTSDataPoint) GetParentRejectWeight() float32

func (*UsageTSDataPoint) GetStartTs

func (x *UsageTSDataPoint) GetStartTs() *timestamppb.Timestamp

func (*UsageTSDataPoint) ProtoMessage

func (*UsageTSDataPoint) ProtoMessage()

func (*UsageTSDataPoint) ProtoReflect

func (x *UsageTSDataPoint) ProtoReflect() protoreflect.Message

func (*UsageTSDataPoint) Reset

func (x *UsageTSDataPoint) Reset()

func (*UsageTSDataPoint) String

func (x *UsageTSDataPoint) String() string

type UsageTimeseries

type UsageTimeseries struct {
	Data []*UsageTSDataPoint `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// Axes for this timeseries - may not be applicable if there are no axes being queried in report mode
	Apikey   *string `protobuf:"bytes,2,opt,name=apikey,proto3,oneof" json:"apikey,omitempty"`
	Feature  *string `protobuf:"bytes,3,opt,name=feature,proto3,oneof" json:"feature,omitempty"`
	Priority *int32  `protobuf:"varint,4,opt,name=priority,proto3,oneof" json:"priority,omitempty"`
	Tags     []*Tag  `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*UsageTimeseries) Descriptor deprecated

func (*UsageTimeseries) Descriptor() ([]byte, []int)

Deprecated: Use UsageTimeseries.ProtoReflect.Descriptor instead.

func (*UsageTimeseries) GetApikey

func (x *UsageTimeseries) GetApikey() string

func (*UsageTimeseries) GetData

func (x *UsageTimeseries) GetData() []*UsageTSDataPoint

func (*UsageTimeseries) GetFeature

func (x *UsageTimeseries) GetFeature() string

func (*UsageTimeseries) GetPriority

func (x *UsageTimeseries) GetPriority() int32

func (*UsageTimeseries) GetTags

func (x *UsageTimeseries) GetTags() []*Tag

func (*UsageTimeseries) ProtoMessage

func (*UsageTimeseries) ProtoMessage()

func (*UsageTimeseries) ProtoReflect

func (x *UsageTimeseries) ProtoReflect() protoreflect.Message

func (*UsageTimeseries) Reset

func (x *UsageTimeseries) Reset()

func (*UsageTimeseries) String

func (x *UsageTimeseries) String() string

type ValidateTokenRequest

type ValidateTokenRequest struct {
	Tokens []*TokenInfo `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

Calls Hub to validate a token (ensures token has not expired, was minted by Hub, and related to the specified Guard). Used from Ingress Guards. Ensures callers have acquired quota prior to expending resources.

func (*ValidateTokenRequest) Descriptor deprecated

func (*ValidateTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead.

func (*ValidateTokenRequest) GetTokens

func (x *ValidateTokenRequest) GetTokens() []*TokenInfo

func (*ValidateTokenRequest) ProtoMessage

func (*ValidateTokenRequest) ProtoMessage()

func (*ValidateTokenRequest) ProtoReflect

func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message

func (*ValidateTokenRequest) Reset

func (x *ValidateTokenRequest) Reset()

func (*ValidateTokenRequest) String

func (x *ValidateTokenRequest) String() string

type ValidateTokenResponse

type ValidateTokenResponse struct {
	Valid       bool          `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` // Unused, does not work in batch mode, will remove in V1 API
	TokensValid []*TokenValid `protobuf:"bytes,2,rep,name=tokens_valid,json=tokensValid,proto3" json:"tokens_valid,omitempty"`
	// contains filtered or unexported fields
}

Specifies whether tokens were valid or not.

func (*ValidateTokenResponse) Descriptor deprecated

func (*ValidateTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidateTokenResponse.ProtoReflect.Descriptor instead.

func (*ValidateTokenResponse) GetTokensValid

func (x *ValidateTokenResponse) GetTokensValid() []*TokenValid

func (*ValidateTokenResponse) GetValid

func (x *ValidateTokenResponse) GetValid() bool

func (*ValidateTokenResponse) ProtoMessage

func (*ValidateTokenResponse) ProtoMessage()

func (*ValidateTokenResponse) ProtoReflect

func (x *ValidateTokenResponse) ProtoReflect() protoreflect.Message

func (*ValidateTokenResponse) Reset

func (x *ValidateTokenResponse) Reset()

func (*ValidateTokenResponse) String

func (x *ValidateTokenResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL