Documentation ¶
Index ¶
- Constants
- Variables
- func NewRateLimitConfigClient(nodeinfo *core.Node, typedApply ApplyRateLimitConfig) client.Client
- func RegisterRateLimitDiscoveryServiceServer(s *grpc.Server, srv RateLimitDiscoveryServiceServer)
- type ApplyRateLimitConfig
- type RateLimitConfig
- func (*RateLimitConfig) Descriptor() ([]byte, []int)
- func (this *RateLimitConfig) Equal(that interface{}) bool
- func (m *RateLimitConfig) GetDescriptors() []*ratelimit.Descriptor
- func (m *RateLimitConfig) GetDomain() string
- func (*RateLimitConfig) ProtoMessage()
- func (m *RateLimitConfig) Reset()
- func (m *RateLimitConfig) String() string
- func (m *RateLimitConfig) XXX_DiscardUnknown()
- func (m *RateLimitConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RateLimitConfig) XXX_Merge(src proto.Message)
- func (m *RateLimitConfig) XXX_Size() int
- func (m *RateLimitConfig) XXX_Unmarshal(b []byte) error
- type RateLimitConfigXdsResourceWrapper
- type RateLimitDiscoveryServiceClient
- type RateLimitDiscoveryServiceServer
- type RateLimitDiscoveryService_DeltaRateLimitConfigClient
- type RateLimitDiscoveryService_DeltaRateLimitConfigServer
- type RateLimitDiscoveryService_StreamRateLimitConfigClient
- type RateLimitDiscoveryService_StreamRateLimitConfigServer
- type UnimplementedRateLimitDiscoveryServiceServer
- func (*UnimplementedRateLimitDiscoveryServiceServer) DeltaRateLimitConfig(srv RateLimitDiscoveryService_DeltaRateLimitConfigServer) error
- func (*UnimplementedRateLimitDiscoveryServiceServer) FetchRateLimitConfig(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
- func (*UnimplementedRateLimitDiscoveryServiceServer) StreamRateLimitConfig(srv RateLimitDiscoveryService_StreamRateLimitConfigServer) error
Constants ¶
const RateLimitConfigType = cache.TypePrefix + "/glooe.solo.io.RateLimitConfig"
Variables ¶
var RateLimitConfigTypeRecord = client.NewTypeRecord( RateLimitConfigType, func() cache.ResourceProto { return &RateLimitConfig{} }, func(r cache.ResourceProto) cache.Resource { return &RateLimitConfigXdsResourceWrapper{Resource: r.(*RateLimitConfig)} }, )
Define a type record. This is used by the generic client library.
Functions ¶
func NewRateLimitConfigClient ¶
func NewRateLimitConfigClient(nodeinfo *core.Node, typedApply ApplyRateLimitConfig) client.Client
func RegisterRateLimitDiscoveryServiceServer ¶
func RegisterRateLimitDiscoveryServiceServer(s *grpc.Server, srv RateLimitDiscoveryServiceServer)
Types ¶
type ApplyRateLimitConfig ¶
type ApplyRateLimitConfig func(version string, resources []*RateLimitConfig) error
The apply functions receives resources and returns an error if they were applied correctly. In theory the configuration can become valid in the future (i.e. eventually consistent), but I don't think we need to worry about that now As our current use cases only have one configuration resource, so no interactions are expected.
type RateLimitConfig ¶
type RateLimitConfig struct { // @solo-kit:resource.name Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` Descriptors []*ratelimit.Descriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
@solo-kit:xds-service=RateLimitDiscoveryService @solo-kit:resource.no_references
func (*RateLimitConfig) Descriptor ¶
func (*RateLimitConfig) Descriptor() ([]byte, []int)
func (*RateLimitConfig) Equal ¶
func (this *RateLimitConfig) Equal(that interface{}) bool
func (*RateLimitConfig) GetDescriptors ¶
func (m *RateLimitConfig) GetDescriptors() []*ratelimit.Descriptor
func (*RateLimitConfig) GetDomain ¶
func (m *RateLimitConfig) GetDomain() string
func (*RateLimitConfig) ProtoMessage ¶
func (*RateLimitConfig) ProtoMessage()
func (*RateLimitConfig) Reset ¶
func (m *RateLimitConfig) Reset()
func (*RateLimitConfig) String ¶
func (m *RateLimitConfig) String() string
func (*RateLimitConfig) XXX_DiscardUnknown ¶
func (m *RateLimitConfig) XXX_DiscardUnknown()
func (*RateLimitConfig) XXX_Marshal ¶
func (m *RateLimitConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RateLimitConfig) XXX_Merge ¶
func (m *RateLimitConfig) XXX_Merge(src proto.Message)
func (*RateLimitConfig) XXX_Size ¶
func (m *RateLimitConfig) XXX_Size() int
func (*RateLimitConfig) XXX_Unmarshal ¶
func (m *RateLimitConfig) XXX_Unmarshal(b []byte) error
type RateLimitConfigXdsResourceWrapper ¶
type RateLimitConfigXdsResourceWrapper struct { // TODO(yuval-k): This is public for mitchellh hashstructure to work properly. consider better alternatives. Resource *RateLimitConfig }
Defined a resource - to be used by snapshot
func NewRateLimitConfigXdsResourceWrapper ¶
func NewRateLimitConfigXdsResourceWrapper(resourceProto *RateLimitConfig) *RateLimitConfigXdsResourceWrapper
func (*RateLimitConfigXdsResourceWrapper) References ¶
func (e *RateLimitConfigXdsResourceWrapper) References() []cache.XdsResourceReference
func (*RateLimitConfigXdsResourceWrapper) ResourceProto ¶
func (e *RateLimitConfigXdsResourceWrapper) ResourceProto() cache.ResourceProto
func (*RateLimitConfigXdsResourceWrapper) Self ¶
func (e *RateLimitConfigXdsResourceWrapper) Self() cache.XdsResourceReference
type RateLimitDiscoveryServiceClient ¶
type RateLimitDiscoveryServiceClient interface { StreamRateLimitConfig(ctx context.Context, opts ...grpc.CallOption) (RateLimitDiscoveryService_StreamRateLimitConfigClient, error) DeltaRateLimitConfig(ctx context.Context, opts ...grpc.CallOption) (RateLimitDiscoveryService_DeltaRateLimitConfigClient, error) FetchRateLimitConfig(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) }
RateLimitDiscoveryServiceClient is the client API for RateLimitDiscoveryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRateLimitDiscoveryServiceClient ¶
func NewRateLimitDiscoveryServiceClient(cc *grpc.ClientConn) RateLimitDiscoveryServiceClient
type RateLimitDiscoveryServiceServer ¶
type RateLimitDiscoveryServiceServer interface { StreamRateLimitConfig(RateLimitDiscoveryService_StreamRateLimitConfigServer) error DeltaRateLimitConfig(RateLimitDiscoveryService_DeltaRateLimitConfigServer) error FetchRateLimitConfig(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) }
RateLimitDiscoveryServiceServer is the server API for RateLimitDiscoveryService service.
func NewRateLimitDiscoveryServiceServer ¶
func NewRateLimitDiscoveryServiceServer(genericServer server.Server) RateLimitDiscoveryServiceServer
type RateLimitDiscoveryService_DeltaRateLimitConfigClient ¶
type RateLimitDiscoveryService_DeltaRateLimitConfigClient interface { Send(*v2.DeltaDiscoveryRequest) error Recv() (*v2.DeltaDiscoveryResponse, error) grpc.ClientStream }
type RateLimitDiscoveryService_DeltaRateLimitConfigServer ¶
type RateLimitDiscoveryService_DeltaRateLimitConfigServer interface { Send(*v2.DeltaDiscoveryResponse) error Recv() (*v2.DeltaDiscoveryRequest, error) grpc.ServerStream }
type RateLimitDiscoveryService_StreamRateLimitConfigClient ¶
type RateLimitDiscoveryService_StreamRateLimitConfigClient interface { Send(*v2.DiscoveryRequest) error Recv() (*v2.DiscoveryResponse, error) grpc.ClientStream }
type RateLimitDiscoveryService_StreamRateLimitConfigServer ¶
type RateLimitDiscoveryService_StreamRateLimitConfigServer interface { Send(*v2.DiscoveryResponse) error Recv() (*v2.DiscoveryRequest, error) grpc.ServerStream }
type UnimplementedRateLimitDiscoveryServiceServer ¶
type UnimplementedRateLimitDiscoveryServiceServer struct { }
UnimplementedRateLimitDiscoveryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedRateLimitDiscoveryServiceServer) DeltaRateLimitConfig ¶
func (*UnimplementedRateLimitDiscoveryServiceServer) DeltaRateLimitConfig(srv RateLimitDiscoveryService_DeltaRateLimitConfigServer) error
func (*UnimplementedRateLimitDiscoveryServiceServer) FetchRateLimitConfig ¶
func (*UnimplementedRateLimitDiscoveryServiceServer) FetchRateLimitConfig(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
func (*UnimplementedRateLimitDiscoveryServiceServer) StreamRateLimitConfig ¶
func (*UnimplementedRateLimitDiscoveryServiceServer) StreamRateLimitConfig(srv RateLimitDiscoveryService_StreamRateLimitConfigServer) error