Documentation ¶
Overview ¶
Package globalconfig is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGlobalConfigHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGlobalConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GlobalConfigClient) error
- func RegisterGlobalConfigHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGlobalConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GlobalConfigServer) error
- func RegisterGlobalConfigServer(s grpc.ServiceRegistrar, srv GlobalConfigServer)
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetEnabled() bool
- func (x *Config) GetFeatureId() string
- func (x *Config) GetFeatureName() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type GlobalConfigClient
- type GlobalConfigServer
- type GlobalConfig_StreamReadRippleConfigClient
- type GlobalConfig_StreamReadRippleConfigServer
- type GlobalConfig_StreamReadWaveConfigClient
- type GlobalConfig_StreamReadWaveConfigServer
- type StreamConfigRequest
- type StreamListConfigResponse
- func (*StreamListConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamListConfigResponse) GetConfig() []*Config
- func (*StreamListConfigResponse) ProtoMessage()
- func (x *StreamListConfigResponse) ProtoReflect() protoreflect.Message
- func (x *StreamListConfigResponse) Reset()
- func (x *StreamListConfigResponse) String() string
- type UnimplementedGlobalConfigServer
- type UnsafeGlobalConfigServer
Constants ¶
This section is empty.
Variables ¶
var File_globalconfig_v1_globalconfig_proto protoreflect.FileDescriptor
var GlobalConfig_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blueapi.globalconfig.v1.GlobalConfig", HandlerType: (*GlobalConfigServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamReadWaveConfig", Handler: _GlobalConfig_StreamReadWaveConfig_Handler, ServerStreams: true, }, { StreamName: "StreamReadRippleConfig", Handler: _GlobalConfig_StreamReadRippleConfig_Handler, ServerStreams: true, }, }, Metadata: "globalconfig/v1/globalconfig.proto", }
GlobalConfig_ServiceDesc is the grpc.ServiceDesc for GlobalConfig service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGlobalConfigHandler ¶
func RegisterGlobalConfigHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGlobalConfigHandler registers the http handlers for service GlobalConfig to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGlobalConfigHandlerClient ¶
func RegisterGlobalConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GlobalConfigClient) error
RegisterGlobalConfigHandlerClient registers the http handlers for service GlobalConfig to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GlobalConfigClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GlobalConfigClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GlobalConfigClient" to call the correct interceptors.
func RegisterGlobalConfigHandlerFromEndpoint ¶
func RegisterGlobalConfigHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGlobalConfigHandlerFromEndpoint is same as RegisterGlobalConfigHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGlobalConfigHandlerServer ¶
func RegisterGlobalConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GlobalConfigServer) error
RegisterGlobalConfigHandlerServer registers the http handlers for service GlobalConfig to "mux". UnaryRPC :call GlobalConfigServer 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 RegisterGlobalConfigHandlerFromEndpoint instead.
func RegisterGlobalConfigServer ¶
func RegisterGlobalConfigServer(s grpc.ServiceRegistrar, srv GlobalConfigServer)
Types ¶
type Config ¶
type Config struct { // The feature name. FeatureId string `protobuf:"bytes,1,opt,name=feature_id,json=featureId,proto3" json:"feature_id,omitempty"` // Required. The feature id. FeatureName string `protobuf:"bytes,2,opt,name=feature_name,json=featureName,proto3" json:"feature_name,omitempty"` // The feature enabled or disabled. // Set value to enable or disable the use of the feature. Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` // contains filtered or unexported fields }
Response message for Config.
func (*Config) Descriptor
deprecated
func (*Config) GetEnabled ¶
func (*Config) GetFeatureId ¶
func (*Config) GetFeatureName ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type GlobalConfigClient ¶
type GlobalConfigClient interface { StreamReadWaveConfig(ctx context.Context, in *StreamConfigRequest, opts ...grpc.CallOption) (GlobalConfig_StreamReadWaveConfigClient, error) StreamReadRippleConfig(ctx context.Context, in *StreamConfigRequest, opts ...grpc.CallOption) (GlobalConfig_StreamReadRippleConfigClient, error) }
GlobalConfigClient is the client API for GlobalConfig service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGlobalConfigClient ¶
func NewGlobalConfigClient(cc grpc.ClientConnInterface) GlobalConfigClient
type GlobalConfigServer ¶
type GlobalConfigServer interface { StreamReadWaveConfig(*StreamConfigRequest, GlobalConfig_StreamReadWaveConfigServer) error StreamReadRippleConfig(*StreamConfigRequest, GlobalConfig_StreamReadRippleConfigServer) error // contains filtered or unexported methods }
GlobalConfigServer is the server API for GlobalConfig service. All implementations must embed UnimplementedGlobalConfigServer for forward compatibility
type GlobalConfig_StreamReadRippleConfigClient ¶
type GlobalConfig_StreamReadRippleConfigClient interface { Recv() (*StreamListConfigResponse, error) grpc.ClientStream }
type GlobalConfig_StreamReadRippleConfigServer ¶
type GlobalConfig_StreamReadRippleConfigServer interface { Send(*StreamListConfigResponse) error grpc.ServerStream }
type GlobalConfig_StreamReadWaveConfigClient ¶
type GlobalConfig_StreamReadWaveConfigClient interface { Recv() (*StreamListConfigResponse, error) grpc.ClientStream }
type GlobalConfig_StreamReadWaveConfigServer ¶
type GlobalConfig_StreamReadWaveConfigServer interface { Send(*StreamListConfigResponse) error grpc.ServerStream }
type StreamConfigRequest ¶
type StreamConfigRequest struct {
// contains filtered or unexported fields
}
Request message for GlobalConfig.Config.
func (*StreamConfigRequest) Descriptor
deprecated
func (*StreamConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamConfigRequest.ProtoReflect.Descriptor instead.
func (*StreamConfigRequest) ProtoMessage ¶
func (*StreamConfigRequest) ProtoMessage()
func (*StreamConfigRequest) ProtoReflect ¶
func (x *StreamConfigRequest) ProtoReflect() protoreflect.Message
func (*StreamConfigRequest) Reset ¶
func (x *StreamConfigRequest) Reset()
func (*StreamConfigRequest) String ¶
func (x *StreamConfigRequest) String() string
type StreamListConfigResponse ¶
type StreamListConfigResponse struct { // A list of global configs Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
Response message for GlobalConfig.Config.
func (*StreamListConfigResponse) Descriptor
deprecated
func (*StreamListConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamListConfigResponse.ProtoReflect.Descriptor instead.
func (*StreamListConfigResponse) GetConfig ¶
func (x *StreamListConfigResponse) GetConfig() []*Config
func (*StreamListConfigResponse) ProtoMessage ¶
func (*StreamListConfigResponse) ProtoMessage()
func (*StreamListConfigResponse) ProtoReflect ¶
func (x *StreamListConfigResponse) ProtoReflect() protoreflect.Message
func (*StreamListConfigResponse) Reset ¶
func (x *StreamListConfigResponse) Reset()
func (*StreamListConfigResponse) String ¶
func (x *StreamListConfigResponse) String() string
type UnimplementedGlobalConfigServer ¶
type UnimplementedGlobalConfigServer struct { }
UnimplementedGlobalConfigServer must be embedded to have forward compatible implementations.
func (UnimplementedGlobalConfigServer) StreamReadRippleConfig ¶
func (UnimplementedGlobalConfigServer) StreamReadRippleConfig(*StreamConfigRequest, GlobalConfig_StreamReadRippleConfigServer) error
func (UnimplementedGlobalConfigServer) StreamReadWaveConfig ¶
func (UnimplementedGlobalConfigServer) StreamReadWaveConfig(*StreamConfigRequest, GlobalConfig_StreamReadWaveConfigServer) error
type UnsafeGlobalConfigServer ¶
type UnsafeGlobalConfigServer interface {
// contains filtered or unexported methods
}
UnsafeGlobalConfigServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GlobalConfigServer will result in compilation errors.