Documentation ¶
Overview ¶
Package sdk is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterSDKHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSDKHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SDKClient) error
- func RegisterSDKHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSDKServer(s *grpc.Server, srv SDKServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type GameServer
- func (*GameServer) Descriptor() ([]byte, []int)
- func (m *GameServer) GetObjectMeta() *GameServer_ObjectMeta
- func (m *GameServer) GetSpec() *GameServer_Spec
- func (m *GameServer) GetStatus() *GameServer_Status
- func (*GameServer) ProtoMessage()
- func (m *GameServer) Reset()
- func (m *GameServer) String() string
- func (m *GameServer) XXX_DiscardUnknown()
- func (m *GameServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer) XXX_Merge(src proto.Message)
- func (m *GameServer) XXX_Size() int
- func (m *GameServer) XXX_Unmarshal(b []byte) error
- type GameServer_ObjectMeta
- func (*GameServer_ObjectMeta) Descriptor() ([]byte, []int)
- func (m *GameServer_ObjectMeta) GetAnnotations() map[string]string
- func (m *GameServer_ObjectMeta) GetCreationTimestamp() int64
- func (m *GameServer_ObjectMeta) GetDeletionTimestamp() int64
- func (m *GameServer_ObjectMeta) GetGeneration() int64
- func (m *GameServer_ObjectMeta) GetLabels() map[string]string
- func (m *GameServer_ObjectMeta) GetName() string
- func (m *GameServer_ObjectMeta) GetNamespace() string
- func (m *GameServer_ObjectMeta) GetResourceVersion() string
- func (m *GameServer_ObjectMeta) GetUid() string
- func (*GameServer_ObjectMeta) ProtoMessage()
- func (m *GameServer_ObjectMeta) Reset()
- func (m *GameServer_ObjectMeta) String() string
- func (m *GameServer_ObjectMeta) XXX_DiscardUnknown()
- func (m *GameServer_ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer_ObjectMeta) XXX_Merge(src proto.Message)
- func (m *GameServer_ObjectMeta) XXX_Size() int
- func (m *GameServer_ObjectMeta) XXX_Unmarshal(b []byte) error
- type GameServer_Spec
- func (*GameServer_Spec) Descriptor() ([]byte, []int)
- func (m *GameServer_Spec) GetHealth() *GameServer_Spec_Health
- func (*GameServer_Spec) ProtoMessage()
- func (m *GameServer_Spec) Reset()
- func (m *GameServer_Spec) String() string
- func (m *GameServer_Spec) XXX_DiscardUnknown()
- func (m *GameServer_Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer_Spec) XXX_Merge(src proto.Message)
- func (m *GameServer_Spec) XXX_Size() int
- func (m *GameServer_Spec) XXX_Unmarshal(b []byte) error
- type GameServer_Spec_Health
- func (*GameServer_Spec_Health) Descriptor() ([]byte, []int)
- func (m *GameServer_Spec_Health) GetDisabled() bool
- func (m *GameServer_Spec_Health) GetFailureThreshold() int32
- func (m *GameServer_Spec_Health) GetInitialDelaySeconds() int32
- func (m *GameServer_Spec_Health) GetPeriodSeconds() int32
- func (*GameServer_Spec_Health) ProtoMessage()
- func (m *GameServer_Spec_Health) Reset()
- func (m *GameServer_Spec_Health) String() string
- func (m *GameServer_Spec_Health) XXX_DiscardUnknown()
- func (m *GameServer_Spec_Health) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer_Spec_Health) XXX_Merge(src proto.Message)
- func (m *GameServer_Spec_Health) XXX_Size() int
- func (m *GameServer_Spec_Health) XXX_Unmarshal(b []byte) error
- type GameServer_Status
- func (*GameServer_Status) Descriptor() ([]byte, []int)
- func (m *GameServer_Status) GetAddress() string
- func (m *GameServer_Status) GetPorts() []*GameServer_Status_Port
- func (m *GameServer_Status) GetState() string
- func (*GameServer_Status) ProtoMessage()
- func (m *GameServer_Status) Reset()
- func (m *GameServer_Status) String() string
- func (m *GameServer_Status) XXX_DiscardUnknown()
- func (m *GameServer_Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer_Status) XXX_Merge(src proto.Message)
- func (m *GameServer_Status) XXX_Size() int
- func (m *GameServer_Status) XXX_Unmarshal(b []byte) error
- type GameServer_Status_Port
- func (*GameServer_Status_Port) Descriptor() ([]byte, []int)
- func (m *GameServer_Status_Port) GetName() string
- func (m *GameServer_Status_Port) GetPort() int32
- func (*GameServer_Status_Port) ProtoMessage()
- func (m *GameServer_Status_Port) Reset()
- func (m *GameServer_Status_Port) String() string
- func (m *GameServer_Status_Port) XXX_DiscardUnknown()
- func (m *GameServer_Status_Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GameServer_Status_Port) XXX_Merge(src proto.Message)
- func (m *GameServer_Status_Port) XXX_Size() int
- func (m *GameServer_Status_Port) XXX_Unmarshal(b []byte) error
- type SDKClient
- type SDKServer
- type SDK_HealthClient
- type SDK_HealthServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSDKHandler ¶ added in v0.3.0
RegisterSDKHandler registers the http handlers for service SDK to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSDKHandlerClient ¶ added in v0.3.0
RegisterSDKHandler registers the http handlers for service SDK to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SDKClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SDKClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SDKClient" to call the correct interceptors.
func RegisterSDKHandlerFromEndpoint ¶ added in v0.3.0
func RegisterSDKHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSDKHandlerFromEndpoint is same as RegisterSDKHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSDKServer ¶
Types ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶ added in v0.3.0
func (*Empty) XXX_Unmarshal ¶ added in v0.3.0
type GameServer ¶ added in v0.3.0
type GameServer struct { ObjectMeta *GameServer_ObjectMeta `protobuf:"bytes,1,opt,name=object_meta,json=objectMeta" json:"object_meta,omitempty"` Spec *GameServer_Spec `protobuf:"bytes,2,opt,name=spec" json:"spec,omitempty"` Status *GameServer_Status `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A GameServer Custom Resource Definition object We will only export those resources that make the most sense. Can always expand to more as needed.
func (*GameServer) Descriptor ¶ added in v0.3.0
func (*GameServer) Descriptor() ([]byte, []int)
func (*GameServer) GetObjectMeta ¶ added in v0.3.0
func (m *GameServer) GetObjectMeta() *GameServer_ObjectMeta
func (*GameServer) GetSpec ¶ added in v0.3.0
func (m *GameServer) GetSpec() *GameServer_Spec
func (*GameServer) GetStatus ¶ added in v0.3.0
func (m *GameServer) GetStatus() *GameServer_Status
func (*GameServer) ProtoMessage ¶ added in v0.3.0
func (*GameServer) ProtoMessage()
func (*GameServer) Reset ¶ added in v0.3.0
func (m *GameServer) Reset()
func (*GameServer) String ¶ added in v0.3.0
func (m *GameServer) String() string
func (*GameServer) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer) XXX_DiscardUnknown()
func (*GameServer) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer) XXX_Merge(src proto.Message)
func (*GameServer) XXX_Size ¶ added in v0.3.0
func (m *GameServer) XXX_Size() int
func (*GameServer) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer) XXX_Unmarshal(b []byte) error
type GameServer_ObjectMeta ¶ added in v0.3.0
type GameServer_ObjectMeta struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` Uid string `protobuf:"bytes,3,opt,name=uid" json:"uid,omitempty"` ResourceVersion string `protobuf:"bytes,4,opt,name=resource_version,json=resourceVersion" json:"resource_version,omitempty"` Generation int64 `protobuf:"varint,5,opt,name=generation" json:"generation,omitempty"` // timestamp is in Epoch format, unit: seconds CreationTimestamp int64 `protobuf:"varint,6,opt,name=creation_timestamp,json=creationTimestamp" json:"creation_timestamp,omitempty"` // optional deletion timestamp in Epoch format, unit: seconds DeletionTimestamp int64 `protobuf:"varint,7,opt,name=deletion_timestamp,json=deletionTimestamp" json:"deletion_timestamp,omitempty"` Annotations map[string]string `` /* 142-byte string literal not displayed */ Labels map[string]string `` /* 132-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
representation of the K8s ObjectMeta resource
func (*GameServer_ObjectMeta) Descriptor ¶ added in v0.3.0
func (*GameServer_ObjectMeta) Descriptor() ([]byte, []int)
func (*GameServer_ObjectMeta) GetAnnotations ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetAnnotations() map[string]string
func (*GameServer_ObjectMeta) GetCreationTimestamp ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetCreationTimestamp() int64
func (*GameServer_ObjectMeta) GetDeletionTimestamp ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetDeletionTimestamp() int64
func (*GameServer_ObjectMeta) GetGeneration ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetGeneration() int64
func (*GameServer_ObjectMeta) GetLabels ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetLabels() map[string]string
func (*GameServer_ObjectMeta) GetName ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetName() string
func (*GameServer_ObjectMeta) GetNamespace ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetNamespace() string
func (*GameServer_ObjectMeta) GetResourceVersion ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetResourceVersion() string
func (*GameServer_ObjectMeta) GetUid ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) GetUid() string
func (*GameServer_ObjectMeta) ProtoMessage ¶ added in v0.3.0
func (*GameServer_ObjectMeta) ProtoMessage()
func (*GameServer_ObjectMeta) Reset ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) Reset()
func (*GameServer_ObjectMeta) String ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) String() string
func (*GameServer_ObjectMeta) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) XXX_DiscardUnknown()
func (*GameServer_ObjectMeta) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer_ObjectMeta) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer_ObjectMeta) XXX_Merge(src proto.Message)
func (*GameServer_ObjectMeta) XXX_Size ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) XXX_Size() int
func (*GameServer_ObjectMeta) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer_ObjectMeta) XXX_Unmarshal(b []byte) error
type GameServer_Spec ¶ added in v0.3.0
type GameServer_Spec struct { Health *GameServer_Spec_Health `protobuf:"bytes,1,opt,name=health" json:"health,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GameServer_Spec) Descriptor ¶ added in v0.3.0
func (*GameServer_Spec) Descriptor() ([]byte, []int)
func (*GameServer_Spec) GetHealth ¶ added in v0.3.0
func (m *GameServer_Spec) GetHealth() *GameServer_Spec_Health
func (*GameServer_Spec) ProtoMessage ¶ added in v0.3.0
func (*GameServer_Spec) ProtoMessage()
func (*GameServer_Spec) Reset ¶ added in v0.3.0
func (m *GameServer_Spec) Reset()
func (*GameServer_Spec) String ¶ added in v0.3.0
func (m *GameServer_Spec) String() string
func (*GameServer_Spec) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer_Spec) XXX_DiscardUnknown()
func (*GameServer_Spec) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer_Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer_Spec) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer_Spec) XXX_Merge(src proto.Message)
func (*GameServer_Spec) XXX_Size ¶ added in v0.3.0
func (m *GameServer_Spec) XXX_Size() int
func (*GameServer_Spec) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer_Spec) XXX_Unmarshal(b []byte) error
type GameServer_Spec_Health ¶ added in v0.3.0
type GameServer_Spec_Health struct { Disabled bool `protobuf:"varint,1,opt,name=Disabled" json:"Disabled,omitempty"` PeriodSeconds int32 `protobuf:"varint,2,opt,name=PeriodSeconds" json:"PeriodSeconds,omitempty"` FailureThreshold int32 `protobuf:"varint,3,opt,name=FailureThreshold" json:"FailureThreshold,omitempty"` InitialDelaySeconds int32 `protobuf:"varint,4,opt,name=InitialDelaySeconds" json:"InitialDelaySeconds,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GameServer_Spec_Health) Descriptor ¶ added in v0.3.0
func (*GameServer_Spec_Health) Descriptor() ([]byte, []int)
func (*GameServer_Spec_Health) GetDisabled ¶ added in v0.3.0
func (m *GameServer_Spec_Health) GetDisabled() bool
func (*GameServer_Spec_Health) GetFailureThreshold ¶ added in v0.3.0
func (m *GameServer_Spec_Health) GetFailureThreshold() int32
func (*GameServer_Spec_Health) GetInitialDelaySeconds ¶ added in v0.3.0
func (m *GameServer_Spec_Health) GetInitialDelaySeconds() int32
func (*GameServer_Spec_Health) GetPeriodSeconds ¶ added in v0.3.0
func (m *GameServer_Spec_Health) GetPeriodSeconds() int32
func (*GameServer_Spec_Health) ProtoMessage ¶ added in v0.3.0
func (*GameServer_Spec_Health) ProtoMessage()
func (*GameServer_Spec_Health) Reset ¶ added in v0.3.0
func (m *GameServer_Spec_Health) Reset()
func (*GameServer_Spec_Health) String ¶ added in v0.3.0
func (m *GameServer_Spec_Health) String() string
func (*GameServer_Spec_Health) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer_Spec_Health) XXX_DiscardUnknown()
func (*GameServer_Spec_Health) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer_Spec_Health) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer_Spec_Health) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer_Spec_Health) XXX_Merge(src proto.Message)
func (*GameServer_Spec_Health) XXX_Size ¶ added in v0.3.0
func (m *GameServer_Spec_Health) XXX_Size() int
func (*GameServer_Spec_Health) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer_Spec_Health) XXX_Unmarshal(b []byte) error
type GameServer_Status ¶ added in v0.3.0
type GameServer_Status struct { State string `protobuf:"bytes,1,opt,name=state" json:"state,omitempty"` Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` Ports []*GameServer_Status_Port `protobuf:"bytes,3,rep,name=ports" json:"ports,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GameServer_Status) Descriptor ¶ added in v0.3.0
func (*GameServer_Status) Descriptor() ([]byte, []int)
func (*GameServer_Status) GetAddress ¶ added in v0.3.0
func (m *GameServer_Status) GetAddress() string
func (*GameServer_Status) GetPorts ¶ added in v0.3.0
func (m *GameServer_Status) GetPorts() []*GameServer_Status_Port
func (*GameServer_Status) GetState ¶ added in v0.3.0
func (m *GameServer_Status) GetState() string
func (*GameServer_Status) ProtoMessage ¶ added in v0.3.0
func (*GameServer_Status) ProtoMessage()
func (*GameServer_Status) Reset ¶ added in v0.3.0
func (m *GameServer_Status) Reset()
func (*GameServer_Status) String ¶ added in v0.3.0
func (m *GameServer_Status) String() string
func (*GameServer_Status) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer_Status) XXX_DiscardUnknown()
func (*GameServer_Status) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer_Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer_Status) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer_Status) XXX_Merge(src proto.Message)
func (*GameServer_Status) XXX_Size ¶ added in v0.3.0
func (m *GameServer_Status) XXX_Size() int
func (*GameServer_Status) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer_Status) XXX_Unmarshal(b []byte) error
type GameServer_Status_Port ¶ added in v0.3.0
type GameServer_Status_Port struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GameServer_Status_Port) Descriptor ¶ added in v0.3.0
func (*GameServer_Status_Port) Descriptor() ([]byte, []int)
func (*GameServer_Status_Port) GetName ¶ added in v0.3.0
func (m *GameServer_Status_Port) GetName() string
func (*GameServer_Status_Port) GetPort ¶ added in v0.3.0
func (m *GameServer_Status_Port) GetPort() int32
func (*GameServer_Status_Port) ProtoMessage ¶ added in v0.3.0
func (*GameServer_Status_Port) ProtoMessage()
func (*GameServer_Status_Port) Reset ¶ added in v0.3.0
func (m *GameServer_Status_Port) Reset()
func (*GameServer_Status_Port) String ¶ added in v0.3.0
func (m *GameServer_Status_Port) String() string
func (*GameServer_Status_Port) XXX_DiscardUnknown ¶ added in v0.3.0
func (m *GameServer_Status_Port) XXX_DiscardUnknown()
func (*GameServer_Status_Port) XXX_Marshal ¶ added in v0.3.0
func (m *GameServer_Status_Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameServer_Status_Port) XXX_Merge ¶ added in v0.3.0
func (dst *GameServer_Status_Port) XXX_Merge(src proto.Message)
func (*GameServer_Status_Port) XXX_Size ¶ added in v0.3.0
func (m *GameServer_Status_Port) XXX_Size() int
func (*GameServer_Status_Port) XXX_Unmarshal ¶ added in v0.3.0
func (m *GameServer_Status_Port) XXX_Unmarshal(b []byte) error
type SDKClient ¶
type SDKClient interface { // Call when the GameServer is ready Ready(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // Call when the GameServer is shutting down Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // Send a Empty every d Duration to declare that this GameSever is healthy Health(ctx context.Context, opts ...grpc.CallOption) (SDK_HealthClient, error) // Retrieve the current GameServer data GetGameServer(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GameServer, error) }
func NewSDKClient ¶
func NewSDKClient(cc *grpc.ClientConn) SDKClient
type SDKServer ¶
type SDKServer interface { // Call when the GameServer is ready Ready(context.Context, *Empty) (*Empty, error) // Call when the GameServer is shutting down Shutdown(context.Context, *Empty) (*Empty, error) // Send a Empty every d Duration to declare that this GameSever is healthy Health(SDK_HealthServer) error // Retrieve the current GameServer data GetGameServer(context.Context, *Empty) (*GameServer, error) }