testgrpc

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_rancher_opni_pkg_test_testgrpc_alerting_test_proto protoreflect.FileDescriptor
View Source
var File_github_com_rancher_opni_pkg_test_testgrpc_stream_proto protoreflect.FileDescriptor
View Source
var StreamService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testgrpc.stream.StreamService",
	HandlerType: (*StreamServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _StreamService_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "github.com/rancher/opni/pkg/test/testgrpc/stream.proto",
}

StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStreamServiceServer

func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)

Types

type CachingHttpServer added in v0.8.3

type CachingHttpServer struct {
	*http.Server
	// contains filtered or unexported fields
}

--- Http server for caching tests ---

func NewCachingHttpServer added in v0.8.3

func NewCachingHttpServer(serverPort int) *CachingHttpServer

type StreamRequest

type StreamRequest struct {
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

func (*StreamRequest) GetRequest

func (x *StreamRequest) GetRequest() string

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) ProtoReflect

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

func (*StreamRequest) Reset

func (x *StreamRequest) Reset()

func (*StreamRequest) String

func (x *StreamRequest) String() string

type StreamResponse

type StreamResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResponse) Descriptor deprecated

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

Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.

func (*StreamResponse) GetResponse

func (x *StreamResponse) GetResponse() string

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) ProtoReflect

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

func (*StreamResponse) Reset

func (x *StreamResponse) Reset()

func (*StreamResponse) String

func (x *StreamResponse) String() string

type StreamServer

type StreamServer struct {
	UnsafeStreamServiceServer

	ServerHandler func(stream StreamService_StreamServer) error
}

func (*StreamServer) Stream

func (s *StreamServer) Stream(stream StreamService_StreamServer) error

type StreamServiceClient

type StreamServiceClient interface {
	Stream(ctx context.Context, opts ...grpc.CallOption) (StreamService_StreamClient, error)
}

StreamServiceClient is the client API for StreamService 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 StreamServiceServer

type StreamServiceServer interface {
	Stream(StreamService_StreamServer) error
	// contains filtered or unexported methods
}

StreamServiceServer is the server API for StreamService service. All implementations must embed UnimplementedStreamServiceServer for forward compatibility

type StreamService_StreamClient

type StreamService_StreamClient interface {
	Send(*StreamRequest) error
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type StreamService_StreamServer

type StreamService_StreamServer interface {
	Send(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type TestSecret added in v0.8.2

type TestSecret struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*TestSecret) CheckRedactedSecrets added in v0.8.2

func (t *TestSecret) CheckRedactedSecrets(unredacted, redacted *TestSecret) bool

func (*TestSecret) Descriptor deprecated added in v0.8.2

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

Deprecated: Use TestSecret.ProtoReflect.Descriptor instead.

func (*TestSecret) GetPassword added in v0.8.2

func (x *TestSecret) GetPassword() string

func (*TestSecret) GetUsername added in v0.8.2

func (x *TestSecret) GetUsername() string

func (*TestSecret) ProtoMessage added in v0.8.2

func (*TestSecret) ProtoMessage()

func (*TestSecret) ProtoReflect added in v0.8.2

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

func (*TestSecret) RedactSecrets added in v0.8.2

func (t *TestSecret) RedactSecrets()

func (*TestSecret) Reset added in v0.8.2

func (x *TestSecret) Reset()

func (*TestSecret) String added in v0.8.2

func (x *TestSecret) String() string

type UnimplementedStreamServiceServer

type UnimplementedStreamServiceServer struct {
}

UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamServiceServer) Stream

type UnsafeStreamServiceServer

type UnsafeStreamServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeStreamServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamServiceServer will result in compilation errors.

type ValueResponse added in v0.8.3

type ValueResponse struct {
	Value int `json:"value"`
}

Jump to

Keyboard shortcuts

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