protocol

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package protocol is a generated protocol buffer package.

It is generated from these files:

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

It has these top-level messages:

DriverInstanceState
DriverInstanceStatesResponse
DriverPoolState
DriverPoolStatesResponse
DriverInstanceStatesRequest
DriverPoolStatesRequest

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 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 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)
}

func NewProtocolServiceClient

func NewProtocolServiceClient(cc *grpc.ClientConn) ProtocolServiceClient

type ProtocolServiceServer

type ProtocolServiceServer interface {
	DriverInstanceStates(context.Context, *DriverInstanceStatesRequest) (*DriverInstanceStatesResponse, error)
	DriverPoolStates(context.Context, *DriverPoolStatesRequest) (*DriverPoolStatesResponse, error)
}

type Service

type Service interface {
	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