server

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Copyright 2020 Jared Allard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exposer

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

func NewExposer

func NewExposer(parentCtx context.Context, k kubernetes.Interface, kconf *rest.Config, log logrus.FieldLogger) (*Exposer, error)

NewExposer creates a service that can maintain multiple expose instances

func (*Exposer) Close

func (e *Exposer) Close(namespace, serviceName string) error

func (*Exposer) Start

func (e *Exposer) Start(ports []kube.ResolvedServicePort, namespace, serviceName string) error

func (*Exposer) Wait

func (e *Exposer) Wait()

Wait waits for all exposes to be shut down

type GRPCService

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

func NewGRPCService

func NewGRPCService(opts *RunOpts) *GRPCService

func (*GRPCService) CleanupPreviousInstance

func (g *GRPCService) CleanupPreviousInstance(ctx context.Context, log logrus.FieldLogger) error

CleanupPreviousInstance attempts to cleanup after a dead localizer instance if a not dead one is found, an error is returned or if it fails to cleanup

func (*GRPCService) Run

Run starts a grpc server with the internal server handler

type GRPCServiceHandler

type GRPCServiceHandler struct {
	api.UnimplementedLocalizerServiceServer
	// contains filtered or unexported fields
}

func NewServiceHandler

func NewServiceHandler(ctx context.Context, log logrus.FieldLogger, opts *RunOpts) (*GRPCServiceHandler, error)

func (*GRPCServiceHandler) ExposeService

func (*GRPCServiceHandler) Kill added in v1.12.0

Kill implements the Kill RPC for the localizer gRPC server.

This RPC just kills the current localizer process. Note that it actually waits until after the RPC returns (responds) before killing the process because if it kills it before it attempts to respond, the transport will have been closed already, resulting in a perceived error. Because of this stipulation, this RPC is only BEST EFFORT.

func (*GRPCServiceHandler) List

func (*GRPCServiceHandler) Ping

func (*GRPCServiceHandler) Stable added in v1.12.0

Stable implements the Stable RPC for the localizer gRPC server.

func (*GRPCServiceHandler) StopExpose

type RunOpts

type RunOpts struct {
	ClusterDomain string
	IPCidr        string
	KubeContext   string
}

Jump to

Keyboard shortcuts

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