protocol

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Overview

Package protocol is a generated protocol buffer package.

It is generated from these files:

github.com/bblfsh/bblfshd/daemon/protocol/generated.proto

It has these top-level messages:

DriverImageState
DriverInstanceState
DriverInstanceStatesResponse
DriverPoolState
DriverPoolStatesResponse
DriverStatesResponse
InstallDriverRequest
RemoveDriverRequest
Response
DriverInstanceStatesRequest
DriverPoolStatesRequest
DriverStatesRequest

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated   = fmt.Errorf("proto: integer overflow")
)
View Source
var Status_name = map[int32]string{
	0: "CREATED",
	1: "RUNNING",
	2: "PAUSING",
	3: "PAUSED",
	4: "STOPPED",
}

Status is the status of a driver instance.

View Source
var Status_value = map[string]int32{
	"CREATED": 0,
	"RUNNING": 1,
	"PAUSING": 2,
	"PAUSED":  3,
	"STOPPED": 4,
}

Functions

func NewProtocolServiceServer

func NewProtocolServiceServer() *protocolServiceServer

func RegisterProtocolServiceServer

func RegisterProtocolServiceServer(s *grpc.Server, srv ProtocolServiceServer)

Types

type DriverImageState

type DriverImageState struct {
	// Referene is the image reference from where retrieved.
	Reference string `json:"reference"`
	// This fields are from manifest.Manifest, due to some limitation of
	// proteus, can't be used directly.
	// Language of the driver.
	Language string `json:"language"`
	// Version of the driver.
	Version string `json:"version,omitempty"`
	// Build time at the compilation of the image.
	Build time.Time `json:"build,omitempty"`
	// Status is the development status of the driver (alpha, beta, etc)
	Status string `json:"status"`
	// OS is the linux distribution running on the driver container.
	OS string `json:"os"`
	// Native version is the version of the compiler/interpreter being use in the
	// native side of the driver.
	NativeVersion []string `json:"native_version"`
	// Go version of the go runtime being use in the driver.
	GoVersion string `json:"go_version"`
}

func (*DriverImageState) Descriptor

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

func (*DriverImageState) Marshal

func (m *DriverImageState) Marshal() (dAtA []byte, err error)

func (*DriverImageState) MarshalTo

func (m *DriverImageState) MarshalTo(dAtA []byte) (int, error)

func (*DriverImageState) ProtoMessage

func (*DriverImageState) ProtoMessage()

func (*DriverImageState) ProtoSize

func (m *DriverImageState) ProtoSize() (n int)

func (*DriverImageState) Reset

func (m *DriverImageState) Reset()

func (*DriverImageState) String

func (m *DriverImageState) String() string

func (*DriverImageState) Unmarshal

func (m *DriverImageState) Unmarshal(dAtA []byte) error

type DriverInstanceState

type DriverInstanceState struct {
	// ID of the container executing the driver.
	ID string `json:"id"`
	// Image used by the container.
	Image string
	// Status current status of the driver.
	Status Status `json:"status"`
	// Create when the driver instances was created.
	Created time.Time `json:"created"`
	// Processes are the pids of the processes running inside of the container.
	Processes []int `json:"processes"`
}

func (*DriverInstanceState) Descriptor

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

func (*DriverInstanceState) Marshal

func (m *DriverInstanceState) Marshal() (dAtA []byte, err error)

func (*DriverInstanceState) MarshalTo

func (m *DriverInstanceState) MarshalTo(dAtA []byte) (int, error)

func (*DriverInstanceState) ProtoMessage

func (*DriverInstanceState) ProtoMessage()

func (*DriverInstanceState) ProtoSize

func (m *DriverInstanceState) ProtoSize() (n int)

func (*DriverInstanceState) Reset

func (m *DriverInstanceState) Reset()

func (*DriverInstanceState) String

func (m *DriverInstanceState) String() string

func (*DriverInstanceState) Unmarshal

func (m *DriverInstanceState) Unmarshal(dAtA []byte) error

type DriverInstanceStatesRequest

type DriverInstanceStatesRequest struct {
}

func (*DriverInstanceStatesRequest) Descriptor

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

func (*DriverInstanceStatesRequest) Marshal

func (m *DriverInstanceStatesRequest) Marshal() (dAtA []byte, err error)

func (*DriverInstanceStatesRequest) MarshalTo

func (m *DriverInstanceStatesRequest) MarshalTo(dAtA []byte) (int, error)

func (*DriverInstanceStatesRequest) ProtoMessage

func (*DriverInstanceStatesRequest) ProtoMessage()

func (*DriverInstanceStatesRequest) ProtoSize

func (m *DriverInstanceStatesRequest) ProtoSize() (n int)

func (*DriverInstanceStatesRequest) Reset

func (m *DriverInstanceStatesRequest) Reset()

func (*DriverInstanceStatesRequest) String

func (m *DriverInstanceStatesRequest) String() string

func (*DriverInstanceStatesRequest) Unmarshal

func (m *DriverInstanceStatesRequest) Unmarshal(dAtA []byte) error

type DriverInstanceStatesResponse

type DriverInstanceStatesResponse struct {
	protocol.Response
	// State represent the state of each driver instance in the daemon.
	State []*DriverInstanceState
}

func DriverInstanceStates

func DriverInstanceStates() *DriverInstanceStatesResponse

func (*DriverInstanceStatesResponse) Descriptor

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

func (*DriverInstanceStatesResponse) Marshal

func (m *DriverInstanceStatesResponse) Marshal() (dAtA []byte, err error)

func (*DriverInstanceStatesResponse) MarshalTo

func (m *DriverInstanceStatesResponse) MarshalTo(dAtA []byte) (int, error)

func (*DriverInstanceStatesResponse) ProtoMessage

func (*DriverInstanceStatesResponse) ProtoMessage()

func (*DriverInstanceStatesResponse) ProtoSize

func (m *DriverInstanceStatesResponse) ProtoSize() (n int)

func (*DriverInstanceStatesResponse) Reset

func (m *DriverInstanceStatesResponse) Reset()

func (*DriverInstanceStatesResponse) String

func (*DriverInstanceStatesResponse) Unmarshal

func (m *DriverInstanceStatesResponse) Unmarshal(dAtA []byte) error

type DriverPoolState

type DriverPoolState struct {
	// Instances number of driver instances wanted.
	Wanted int `json:"wanted"`
	// Running number of driver instances running.
	Running int `json:"running"`
	// Waiting number of request waiting for a request be executed.
	Waiting int `json:"waiting"`
	// Success number of requests executed successfully.
	Success int `json:"success"`
	// Errors number of errors trying to process a request.
	Errors int `json:"errors"`
	// Exited number of drivers exited unexpectedly.
	Exited int `json:"exited"`
}

func (*DriverPoolState) Descriptor

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

func (*DriverPoolState) Marshal

func (m *DriverPoolState) Marshal() (dAtA []byte, err error)

func (*DriverPoolState) MarshalTo

func (m *DriverPoolState) MarshalTo(dAtA []byte) (int, error)

func (*DriverPoolState) ProtoMessage

func (*DriverPoolState) ProtoMessage()

func (*DriverPoolState) ProtoSize

func (m *DriverPoolState) ProtoSize() (n int)

func (*DriverPoolState) Reset

func (m *DriverPoolState) Reset()

func (*DriverPoolState) String

func (m *DriverPoolState) String() string

func (*DriverPoolState) Unmarshal

func (m *DriverPoolState) Unmarshal(dAtA []byte) error

type DriverPoolStatesRequest

type DriverPoolStatesRequest struct {
}

func (*DriverPoolStatesRequest) Descriptor

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

func (*DriverPoolStatesRequest) Marshal

func (m *DriverPoolStatesRequest) Marshal() (dAtA []byte, err error)

func (*DriverPoolStatesRequest) MarshalTo

func (m *DriverPoolStatesRequest) MarshalTo(dAtA []byte) (int, error)

func (*DriverPoolStatesRequest) ProtoMessage

func (*DriverPoolStatesRequest) ProtoMessage()

func (*DriverPoolStatesRequest) ProtoSize

func (m *DriverPoolStatesRequest) ProtoSize() (n int)

func (*DriverPoolStatesRequest) Reset

func (m *DriverPoolStatesRequest) Reset()

func (*DriverPoolStatesRequest) String

func (m *DriverPoolStatesRequest) String() string

func (*DriverPoolStatesRequest) Unmarshal

func (m *DriverPoolStatesRequest) Unmarshal(dAtA []byte) error

type DriverPoolStatesResponse

type DriverPoolStatesResponse struct {
	protocol.Response
	// State represent the state of each pool in the daemon.
	State map[string]*DriverPoolState
}

func DriverPoolStates

func DriverPoolStates() *DriverPoolStatesResponse

func (*DriverPoolStatesResponse) Descriptor

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

func (*DriverPoolStatesResponse) Marshal

func (m *DriverPoolStatesResponse) Marshal() (dAtA []byte, err error)

func (*DriverPoolStatesResponse) MarshalTo

func (m *DriverPoolStatesResponse) MarshalTo(dAtA []byte) (int, error)

func (*DriverPoolStatesResponse) ProtoMessage

func (*DriverPoolStatesResponse) ProtoMessage()

func (*DriverPoolStatesResponse) ProtoSize

func (m *DriverPoolStatesResponse) ProtoSize() (n int)

func (*DriverPoolStatesResponse) Reset

func (m *DriverPoolStatesResponse) Reset()

func (*DriverPoolStatesResponse) String

func (m *DriverPoolStatesResponse) String() string

func (*DriverPoolStatesResponse) Unmarshal

func (m *DriverPoolStatesResponse) Unmarshal(dAtA []byte) error

type DriverStatesRequest

type DriverStatesRequest struct {
}

func (*DriverStatesRequest) Descriptor

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

func (*DriverStatesRequest) Marshal

func (m *DriverStatesRequest) Marshal() (dAtA []byte, err error)

func (*DriverStatesRequest) MarshalTo

func (m *DriverStatesRequest) MarshalTo(dAtA []byte) (int, error)

func (*DriverStatesRequest) ProtoMessage

func (*DriverStatesRequest) ProtoMessage()

func (*DriverStatesRequest) ProtoSize

func (m *DriverStatesRequest) ProtoSize() (n int)

func (*DriverStatesRequest) Reset

func (m *DriverStatesRequest) Reset()

func (*DriverStatesRequest) String

func (m *DriverStatesRequest) String() string

func (*DriverStatesRequest) Unmarshal

func (m *DriverStatesRequest) Unmarshal(dAtA []byte) error

type DriverStatesResponse

type DriverStatesResponse struct {
	protocol.Response
	// State represent the state of each driver in the storage.
	State []*DriverImageState
}

func DriverStates

func DriverStates() *DriverStatesResponse

func (*DriverStatesResponse) Descriptor

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

func (*DriverStatesResponse) Marshal

func (m *DriverStatesResponse) Marshal() (dAtA []byte, err error)

func (*DriverStatesResponse) MarshalTo

func (m *DriverStatesResponse) MarshalTo(dAtA []byte) (int, error)

func (*DriverStatesResponse) ProtoMessage

func (*DriverStatesResponse) ProtoMessage()

func (*DriverStatesResponse) ProtoSize

func (m *DriverStatesResponse) ProtoSize() (n int)

func (*DriverStatesResponse) Reset

func (m *DriverStatesResponse) Reset()

func (*DriverStatesResponse) String

func (m *DriverStatesResponse) String() string

func (*DriverStatesResponse) Unmarshal

func (m *DriverStatesResponse) Unmarshal(dAtA []byte) error

type InstallDriverRequest

type InstallDriverRequest struct {
	// Language supported by the driver being installed.
	Language string
	// ImageReference is the name of the image to be installed in the following
	// format: `transport:[//]name[:tag]`. The default value for tag is `latest`
	ImageReference string
	// Update indicates whether an image should be updated. When set to false,
	// the installation fails if the image already exists.
	Update bool
}

func (*InstallDriverRequest) Descriptor

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

func (*InstallDriverRequest) Marshal

func (m *InstallDriverRequest) Marshal() (dAtA []byte, err error)

func (*InstallDriverRequest) MarshalTo

func (m *InstallDriverRequest) MarshalTo(dAtA []byte) (int, error)

func (*InstallDriverRequest) ProtoMessage

func (*InstallDriverRequest) ProtoMessage()

func (*InstallDriverRequest) ProtoSize

func (m *InstallDriverRequest) ProtoSize() (n int)

func (*InstallDriverRequest) Reset

func (m *InstallDriverRequest) Reset()

func (*InstallDriverRequest) String

func (m *InstallDriverRequest) String() string

func (*InstallDriverRequest) Unmarshal

func (m *InstallDriverRequest) Unmarshal(dAtA []byte) error

type ProtocolServiceClient

type ProtocolServiceClient interface {
	DriverInstanceStates(ctx context.Context, in *DriverInstanceStatesRequest, opts ...grpc.CallOption) (*DriverInstanceStatesResponse, error)
	DriverPoolStates(ctx context.Context, in *DriverPoolStatesRequest, opts ...grpc.CallOption) (*DriverPoolStatesResponse, error)
	DriverStates(ctx context.Context, in *DriverStatesRequest, opts ...grpc.CallOption) (*DriverStatesResponse, error)
	InstallDriver(ctx context.Context, in *InstallDriverRequest, opts ...grpc.CallOption) (*Response, error)
	RemoveDriver(ctx context.Context, in *RemoveDriverRequest, opts ...grpc.CallOption) (*Response, error)
}

func NewProtocolServiceClient

func NewProtocolServiceClient(cc *grpc.ClientConn) ProtocolServiceClient

type RemoveDriverRequest

type RemoveDriverRequest struct {
	// Language supported by the driver to be deleted.
	Language string
}

func (*RemoveDriverRequest) Descriptor

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

func (*RemoveDriverRequest) Marshal

func (m *RemoveDriverRequest) Marshal() (dAtA []byte, err error)

func (*RemoveDriverRequest) MarshalTo

func (m *RemoveDriverRequest) MarshalTo(dAtA []byte) (int, error)

func (*RemoveDriverRequest) ProtoMessage

func (*RemoveDriverRequest) ProtoMessage()

func (*RemoveDriverRequest) ProtoSize

func (m *RemoveDriverRequest) ProtoSize() (n int)

func (*RemoveDriverRequest) Reset

func (m *RemoveDriverRequest) Reset()

func (*RemoveDriverRequest) String

func (m *RemoveDriverRequest) String() string

func (*RemoveDriverRequest) Unmarshal

func (m *RemoveDriverRequest) Unmarshal(dAtA []byte) error

type Response

type Response protocol.Response

func InstallDriver

func InstallDriver(req *InstallDriverRequest) *Response

func RemoveDriver

func RemoveDriver(req *RemoveDriverRequest) *Response

func (*Response) Descriptor

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

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoSize

func (m *Response) ProtoSize() (n int)

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

type Service

type Service interface {
	InstallDriver(language string, image string, update bool) error
	RemoveDriver(language string) error
	DriverStates() ([]*DriverImageState, error)
	DriverPoolStates() map[string]*DriverPoolState
	DriverInstanceStates() ([]*DriverInstanceState, error)
}
var DefaultService Service

DefaultService is the default service used to process requests.

type Status

type Status int

Status is the status of a driver instance.

const (
	// Created the container exists but has not been run yet.
	Created Status = iota
	// Running the container exists and is running.
	Running
	// Pausing the container exists, it is in the process of being paused.
	Pausing
	// Paused the container exists, but all its processes are paused.
	Paused
	// Stopped the container does not have a created or running process.
	Stopped
)

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (i Status) String() string

Jump to

Keyboard shortcuts

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