matchmaking

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package matchmaking is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MatchmakingService_RequestMatch_FullMethodName = "/bricks.v1.matchmaking.MatchmakingService/RequestMatch"
)

Variables

View Source
var File_bricks_v1_matchmaking_request_match_proto protoreflect.FileDescriptor
View Source
var MatchmakingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bricks.v1.matchmaking.MatchmakingService",
	HandlerType: (*MatchmakingServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "RequestMatch",
			Handler:       _MatchmakingService_RequestMatch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "bricks/v1/matchmaking/request_match.proto",
}

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

Functions

func RegisterMatchmakingServiceHandler added in v0.20.0

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

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

func RegisterMatchmakingServiceHandlerClient added in v0.20.0

func RegisterMatchmakingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MatchmakingServiceClient) error

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

func RegisterMatchmakingServiceHandlerFromEndpoint added in v0.20.0

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

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

func RegisterMatchmakingServiceHandlerServer added in v0.20.0

func RegisterMatchmakingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MatchmakingServiceServer) error

RegisterMatchmakingServiceHandlerServer registers the http handlers for service MatchmakingService to "mux". UnaryRPC :call MatchmakingServiceServer 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 RegisterMatchmakingServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterMatchmakingServiceServer

func RegisterMatchmakingServiceServer(s grpc.ServiceRegistrar, srv MatchmakingServiceServer)

Types

type AwaitingMatch

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

func (*AwaitingMatch) Descriptor deprecated

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

Deprecated: Use AwaitingMatch.ProtoReflect.Descriptor instead.

func (*AwaitingMatch) ProtoMessage

func (*AwaitingMatch) ProtoMessage()

func (*AwaitingMatch) ProtoReflect

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

func (*AwaitingMatch) Reset

func (x *AwaitingMatch) Reset()

func (*AwaitingMatch) String

func (x *AwaitingMatch) String() string

type MatchFound

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

func (*MatchFound) Descriptor deprecated

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

Deprecated: Use MatchFound.ProtoReflect.Descriptor instead.

func (*MatchFound) ProtoMessage

func (*MatchFound) ProtoMessage()

func (*MatchFound) ProtoReflect

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

func (*MatchFound) Reset

func (x *MatchFound) Reset()

func (*MatchFound) String

func (x *MatchFound) String() string

type MatchmakingServiceClient

type MatchmakingServiceClient interface {
	RequestMatch(ctx context.Context, in *RequestMatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RequestMatchResponse], error)
}

MatchmakingServiceClient is the client API for MatchmakingService 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 MatchmakingServiceServer

type MatchmakingServiceServer interface {
	RequestMatch(*RequestMatchRequest, grpc.ServerStreamingServer[RequestMatchResponse]) error
	// contains filtered or unexported methods
}

MatchmakingServiceServer is the server API for MatchmakingService service. All implementations must embed UnimplementedMatchmakingServiceServer for forward compatibility.

type MatchmakingService_RequestMatchClient

type MatchmakingService_RequestMatchClient = grpc.ServerStreamingClient[RequestMatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MatchmakingService_RequestMatchServer

type MatchmakingService_RequestMatchServer = grpc.ServerStreamingServer[RequestMatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type RequestMatchRequest

type RequestMatchRequest struct {
	Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestMatchRequest) Descriptor deprecated

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

Deprecated: Use RequestMatchRequest.ProtoReflect.Descriptor instead.

func (*RequestMatchRequest) GetPort added in v0.19.0

func (x *RequestMatchRequest) GetPort() int32

func (*RequestMatchRequest) ProtoMessage

func (*RequestMatchRequest) ProtoMessage()

func (*RequestMatchRequest) ProtoReflect

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

func (*RequestMatchRequest) Reset

func (x *RequestMatchRequest) Reset()

func (*RequestMatchRequest) String

func (x *RequestMatchRequest) String() string

type RequestMatchResponse

type RequestMatchResponse struct {

	// Types that are valid to be assigned to Update:
	//
	//	*RequestMatchResponse_AwaitingMatch
	//	*RequestMatchResponse_MatchFound
	Update isRequestMatchResponse_Update `protobuf_oneof:"update"`
	// contains filtered or unexported fields
}

func (*RequestMatchResponse) Descriptor deprecated

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

Deprecated: Use RequestMatchResponse.ProtoReflect.Descriptor instead.

func (*RequestMatchResponse) GetAwaitingMatch

func (x *RequestMatchResponse) GetAwaitingMatch() *AwaitingMatch

func (*RequestMatchResponse) GetMatchFound

func (x *RequestMatchResponse) GetMatchFound() *MatchFound

func (*RequestMatchResponse) GetUpdate

func (x *RequestMatchResponse) GetUpdate() isRequestMatchResponse_Update

func (*RequestMatchResponse) ProtoMessage

func (*RequestMatchResponse) ProtoMessage()

func (*RequestMatchResponse) ProtoReflect

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

func (*RequestMatchResponse) Reset

func (x *RequestMatchResponse) Reset()

func (*RequestMatchResponse) String

func (x *RequestMatchResponse) String() string

type RequestMatchResponse_AwaitingMatch

type RequestMatchResponse_AwaitingMatch struct {
	AwaitingMatch *AwaitingMatch `protobuf:"bytes,1,opt,name=awaiting_match,json=awaitingMatch,proto3,oneof"`
}

type RequestMatchResponse_MatchFound

type RequestMatchResponse_MatchFound struct {
	MatchFound *MatchFound `protobuf:"bytes,2,opt,name=match_found,json=matchFound,proto3,oneof"`
}

type UnimplementedMatchmakingServiceServer

type UnimplementedMatchmakingServiceServer struct{}

UnimplementedMatchmakingServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

type UnsafeMatchmakingServiceServer

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

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

Directories

Path Synopsis
Package mockmatchmaking is a generated GoMock package.
Package mockmatchmaking is a generated GoMock package.

Jump to

Keyboard shortcuts

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