livemapper

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LivemapperServicePerm perms.Category = "LivemapperService"

	LivemapperServiceStreamPerm                perms.Name = "Stream"
	LivemapperServiceStreamDispatchesPermField perms.Key  = "Dispatches"
	LivemapperServiceStreamPlayersPermField    perms.Key  = "Players"
)
View Source
const (
	DispatchMarkerLimit = 60
)

Variables

View Source
var (
	ErrStreamFailed = status.Error(codes.Internal, "errors.LivemapperService.ErrStreamFailed")
)
View Source
var File_services_livemapper_livemap_proto protoreflect.FileDescriptor
View Source
var LivemapperService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.livemapper.LivemapperService",
	HandlerType: (*LivemapperServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _LivemapperService_Stream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "services/livemapper/livemap.proto",
}

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

Functions

func RegisterLivemapperServiceServer

func RegisterLivemapperServiceServer(s grpc.ServiceRegistrar, srv LivemapperServiceServer)

Types

type LivemapperServiceClient

type LivemapperServiceClient interface {
	// @perm: Attrs=Dispatches/JobList:"config.C.Game.Livemap.Jobs"|Players/JobGradeList
	Stream(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (LivemapperService_StreamClient, error)
}

LivemapperServiceClient is the client API for LivemapperService 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 LivemapperServiceServer

type LivemapperServiceServer interface {
	// @perm: Attrs=Dispatches/JobList:"config.C.Game.Livemap.Jobs"|Players/JobGradeList
	Stream(*StreamRequest, LivemapperService_StreamServer) error
	// contains filtered or unexported methods
}

LivemapperServiceServer is the server API for LivemapperService service. All implementations must embed UnimplementedLivemapperServiceServer for forward compatibility

type LivemapperService_StreamClient

type LivemapperService_StreamClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type LivemapperService_StreamServer

type LivemapperService_StreamServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type Server

type Server struct {
	LivemapperServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, logger *zap.Logger, tp *tracesdk.TracerProvider, db *sql.DB, p perms.Permissions, c *mstlystcdata.Enricher, refreshTime time.Duration, visibleJobs []string) *Server

func (*Server) GenerateRandomDispatchMarker

func (s *Server) GenerateRandomDispatchMarker()

func (*Server) GenerateRandomUserMarker

func (s *Server) GenerateRandomUserMarker()

func (*Server) Start

func (s *Server) Start()

func (*Server) Stream

type StreamRequest

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

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

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

func (*StreamRequest) Validate

func (m *StreamRequest) Validate() error

Validate checks the field values on StreamRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamRequest) ValidateAll

func (m *StreamRequest) ValidateAll() error

ValidateAll checks the field values on StreamRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamRequestMultiError, or nil if none found.

type StreamRequestMultiError

type StreamRequestMultiError []error

StreamRequestMultiError is an error wrapping multiple validation errors returned by StreamRequest.ValidateAll() if the designated constraints aren't met.

func (StreamRequestMultiError) AllErrors

func (m StreamRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StreamRequestMultiError) Error

func (m StreamRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type StreamRequestValidationError

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

StreamRequestValidationError is the validation error returned by StreamRequest.Validate if the designated constraints aren't met.

func (StreamRequestValidationError) Cause

Cause function returns cause value.

func (StreamRequestValidationError) Error

Error satisfies the builtin error interface

func (StreamRequestValidationError) ErrorName

func (e StreamRequestValidationError) ErrorName() string

ErrorName returns error name.

func (StreamRequestValidationError) Field

Field function returns field value.

func (StreamRequestValidationError) Key

Key function returns key value.

func (StreamRequestValidationError) Reason

Reason function returns reason value.

type StreamResponse

type StreamResponse struct {
	JobsDispatches []*jobs.Job               `protobuf:"bytes,1,rep,name=jobs_dispatches,json=jobsDispatches,proto3" json:"jobs_dispatches,omitempty"`
	JobsUsers      []*jobs.Job               `protobuf:"bytes,2,rep,name=jobs_users,json=jobsUsers,proto3" json:"jobs_users,omitempty"`
	Dispatches     []*livemap.DispatchMarker `protobuf:"bytes,3,rep,name=dispatches,proto3" json:"dispatches,omitempty"`
	Users          []*livemap.UserMarker     `protobuf:"bytes,4,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResponse) Descriptor deprecated

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

Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.

func (*StreamResponse) GetDispatches

func (x *StreamResponse) GetDispatches() []*livemap.DispatchMarker

func (*StreamResponse) GetJobsDispatches

func (x *StreamResponse) GetJobsDispatches() []*jobs.Job

func (*StreamResponse) GetJobsUsers

func (x *StreamResponse) GetJobsUsers() []*jobs.Job

func (*StreamResponse) GetUsers

func (x *StreamResponse) GetUsers() []*livemap.UserMarker

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

func (*StreamResponse) Validate

func (m *StreamResponse) Validate() error

Validate checks the field values on StreamResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StreamResponse) ValidateAll

func (m *StreamResponse) ValidateAll() error

ValidateAll checks the field values on StreamResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamResponseMultiError, or nil if none found.

type StreamResponseMultiError

type StreamResponseMultiError []error

StreamResponseMultiError is an error wrapping multiple validation errors returned by StreamResponse.ValidateAll() if the designated constraints aren't met.

func (StreamResponseMultiError) AllErrors

func (m StreamResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StreamResponseMultiError) Error

func (m StreamResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type StreamResponseValidationError

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

StreamResponseValidationError is the validation error returned by StreamResponse.Validate if the designated constraints aren't met.

func (StreamResponseValidationError) Cause

Cause function returns cause value.

func (StreamResponseValidationError) Error

Error satisfies the builtin error interface

func (StreamResponseValidationError) ErrorName

func (e StreamResponseValidationError) ErrorName() string

ErrorName returns error name.

func (StreamResponseValidationError) Field

Field function returns field value.

func (StreamResponseValidationError) Key

Key function returns key value.

func (StreamResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedLivemapperServiceServer

type UnimplementedLivemapperServiceServer struct {
}

UnimplementedLivemapperServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLivemapperServiceServer) Stream

type UnsafeLivemapperServiceServer

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

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

Jump to

Keyboard shortcuts

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