globalconfig

package
v0.6.19 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package globalconfig is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_globalconfig_v1_globalconfig_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetEnabled

func (x *Config) GetEnabled() bool

func (*Config) GetFeatureId

func (x *Config) GetFeatureId() string

func (*Config) GetFeatureName

func (x *Config) GetFeatureName() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

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.

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.

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.

Jump to

Keyboard shortcuts

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