grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthManager = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowManager   = fmt.Errorf("proto: integer overflow")
)
View Source
var Service_Status_name = map[int32]string{
	0: "STOPPED",
	1: "STARTING",
	2: "RUNNING",
	3: "STOPPING",
	4: "ERRORED",
}
View Source
var Service_Status_value = map[string]int32{
	"STOPPED":  0,
	"STARTING": 1,
	"RUNNING":  2,
	"STOPPING": 3,
	"ERRORED":  4,
}

Functions

func RegisterManagerServer

func RegisterManagerServer(s *grpc.Server, srv ManagerServer)

Types

type InfoReq

type InfoReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The info request message.

func (*InfoReq) Descriptor

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

func (*InfoReq) GetId

func (m *InfoReq) GetId() string

func (*InfoReq) Marshal

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

func (*InfoReq) MarshalTo

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

func (*InfoReq) ProtoMessage

func (*InfoReq) ProtoMessage()

func (*InfoReq) Reset

func (m *InfoReq) Reset()

func (*InfoReq) Size

func (m *InfoReq) Size() (n int)

func (*InfoReq) String

func (m *InfoReq) String() string

func (*InfoReq) Unmarshal

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

func (*InfoReq) XXX_DiscardUnknown added in v0.2.0

func (m *InfoReq) XXX_DiscardUnknown()

func (*InfoReq) XXX_Marshal added in v0.2.0

func (m *InfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoReq) XXX_Merge added in v0.2.0

func (dst *InfoReq) XXX_Merge(src proto.Message)

func (*InfoReq) XXX_Size added in v0.2.0

func (m *InfoReq) XXX_Size() int

func (*InfoReq) XXX_Unmarshal added in v0.2.0

func (m *InfoReq) XXX_Unmarshal(b []byte) error

type ListReq

type ListReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The list request message.

func (*ListReq) Descriptor

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

func (*ListReq) Marshal

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

func (*ListReq) MarshalTo

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

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) Reset

func (m *ListReq) Reset()

func (*ListReq) Size

func (m *ListReq) Size() (n int)

func (*ListReq) String

func (m *ListReq) String() string

func (*ListReq) Unmarshal

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

func (*ListReq) XXX_DiscardUnknown added in v0.2.0

func (m *ListReq) XXX_DiscardUnknown()

func (*ListReq) XXX_Marshal added in v0.2.0

func (m *ListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListReq) XXX_Merge added in v0.2.0

func (dst *ListReq) XXX_Merge(src proto.Message)

func (*ListReq) XXX_Size added in v0.2.0

func (m *ListReq) XXX_Size() int

func (*ListReq) XXX_Unmarshal added in v0.2.0

func (m *ListReq) XXX_Unmarshal(b []byte) error

type ManagerClient

type ManagerClient interface {
	// Streams the registered services.
	List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (Manager_ListClient, error)
	// Returns information about a service.
	Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Service, error)
	// Starts a service.
	Start(ctx context.Context, in *StartReq, opts ...grpc.CallOption) (*Service, error)
	// Stops a service.
	Stop(ctx context.Context, in *StopReq, opts ...grpc.CallOption) (*Service, error)
	// Prunes services.
	Prune(ctx context.Context, in *PruneReq, opts ...grpc.CallOption) (Manager_PruneClient, error)
}

func NewManagerClient

func NewManagerClient(cc *grpc.ClientConn) ManagerClient

type ManagerServer

type ManagerServer interface {
	// Streams the registered services.
	List(*ListReq, Manager_ListServer) error
	// Returns information about a service.
	Info(context.Context, *InfoReq) (*Service, error)
	// Starts a service.
	Start(context.Context, *StartReq) (*Service, error)
	// Stops a service.
	Stop(context.Context, *StopReq) (*Service, error)
	// Prunes services.
	Prune(*PruneReq, Manager_PruneServer) error
}

type Manager_ListClient

type Manager_ListClient interface {
	Recv() (*Service, error)
	grpc.ClientStream
}

type Manager_ListServer

type Manager_ListServer interface {
	Send(*Service) error
	grpc.ServerStream
}

type Manager_PruneClient

type Manager_PruneClient interface {
	Recv() (*Service, error)
	grpc.ClientStream
}

type Manager_PruneServer

type Manager_PruneServer interface {
	Send(*Service) error
	grpc.ServerStream
}

type PruneReq

type PruneReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The prune request message.

func (*PruneReq) Descriptor

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

func (*PruneReq) Marshal

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

func (*PruneReq) MarshalTo

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

func (*PruneReq) ProtoMessage

func (*PruneReq) ProtoMessage()

func (*PruneReq) Reset

func (m *PruneReq) Reset()

func (*PruneReq) Size

func (m *PruneReq) Size() (n int)

func (*PruneReq) String

func (m *PruneReq) String() string

func (*PruneReq) Unmarshal

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

func (*PruneReq) XXX_DiscardUnknown added in v0.2.0

func (m *PruneReq) XXX_DiscardUnknown()

func (*PruneReq) XXX_Marshal added in v0.2.0

func (m *PruneReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PruneReq) XXX_Merge added in v0.2.0

func (dst *PruneReq) XXX_Merge(src proto.Message)

func (*PruneReq) XXX_Size added in v0.2.0

func (m *PruneReq) XXX_Size() int

func (*PruneReq) XXX_Unmarshal added in v0.2.0

func (m *PruneReq) XXX_Unmarshal(b []byte) error

type Service

type Service struct {
	Id                   string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Status               Service_Status `protobuf:"varint,2,opt,name=status,proto3,enum=stratumn.node.core.manager.grpc.Service_Status" json:"status,omitempty"`
	Needs                []string       `protobuf:"bytes,3,rep,name=needs" json:"needs,omitempty"`
	Stoppable            bool           `protobuf:"varint,4,opt,name=stoppable,proto3" json:"stoppable,omitempty"`
	Prunable             bool           `protobuf:"varint,5,opt,name=prunable,proto3" json:"prunable,omitempty"`
	Name                 string         `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	Desc                 string         `protobuf:"bytes,7,opt,name=desc,proto3" json:"desc,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

The service message containing information about a service.

func (*Service) Descriptor

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

func (*Service) GetDesc

func (m *Service) GetDesc() string

func (*Service) GetId

func (m *Service) GetId() string

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetNeeds

func (m *Service) GetNeeds() []string

func (*Service) GetPrunable

func (m *Service) GetPrunable() bool

func (*Service) GetStatus

func (m *Service) GetStatus() Service_Status

func (*Service) GetStoppable

func (m *Service) GetStoppable() bool

func (*Service) Marshal

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

func (*Service) MarshalTo

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

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) Size

func (m *Service) Size() (n int)

func (*Service) String

func (m *Service) String() string

func (*Service) Unmarshal

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

func (*Service) XXX_DiscardUnknown added in v0.2.0

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal added in v0.2.0

func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Service) XXX_Merge added in v0.2.0

func (dst *Service) XXX_Merge(src proto.Message)

func (*Service) XXX_Size added in v0.2.0

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal added in v0.2.0

func (m *Service) XXX_Unmarshal(b []byte) error

type Service_Status

type Service_Status int32
const (
	Service_STOPPED  Service_Status = 0
	Service_STARTING Service_Status = 1
	Service_RUNNING  Service_Status = 2
	Service_STOPPING Service_Status = 3
	Service_ERRORED  Service_Status = 4
)

func (Service_Status) EnumDescriptor

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

func (Service_Status) String

func (x Service_Status) String() string

type StartReq

type StartReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The start request message.

func (*StartReq) Descriptor

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

func (*StartReq) GetId

func (m *StartReq) GetId() string

func (*StartReq) Marshal

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

func (*StartReq) MarshalTo

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

func (*StartReq) ProtoMessage

func (*StartReq) ProtoMessage()

func (*StartReq) Reset

func (m *StartReq) Reset()

func (*StartReq) Size

func (m *StartReq) Size() (n int)

func (*StartReq) String

func (m *StartReq) String() string

func (*StartReq) Unmarshal

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

func (*StartReq) XXX_DiscardUnknown added in v0.2.0

func (m *StartReq) XXX_DiscardUnknown()

func (*StartReq) XXX_Marshal added in v0.2.0

func (m *StartReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StartReq) XXX_Merge added in v0.2.0

func (dst *StartReq) XXX_Merge(src proto.Message)

func (*StartReq) XXX_Size added in v0.2.0

func (m *StartReq) XXX_Size() int

func (*StartReq) XXX_Unmarshal added in v0.2.0

func (m *StartReq) XXX_Unmarshal(b []byte) error

type StopReq

type StopReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Prune                bool     `protobuf:"varint,2,opt,name=prune,proto3" json:"prune,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The stop request message.

func (*StopReq) Descriptor

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

func (*StopReq) GetId

func (m *StopReq) GetId() string

func (*StopReq) GetPrune

func (m *StopReq) GetPrune() bool

func (*StopReq) Marshal

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

func (*StopReq) MarshalTo

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

func (*StopReq) ProtoMessage

func (*StopReq) ProtoMessage()

func (*StopReq) Reset

func (m *StopReq) Reset()

func (*StopReq) Size

func (m *StopReq) Size() (n int)

func (*StopReq) String

func (m *StopReq) String() string

func (*StopReq) Unmarshal

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

func (*StopReq) XXX_DiscardUnknown added in v0.2.0

func (m *StopReq) XXX_DiscardUnknown()

func (*StopReq) XXX_Marshal added in v0.2.0

func (m *StopReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StopReq) XXX_Merge added in v0.2.0

func (dst *StopReq) XXX_Merge(src proto.Message)

func (*StopReq) XXX_Size added in v0.2.0

func (m *StopReq) XXX_Size() int

func (*StopReq) XXX_Unmarshal added in v0.2.0

func (m *StopReq) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis
Package mockgrpc is a generated GoMock package.
Package mockgrpc is a generated GoMock package.

Jump to

Keyboard shortcuts

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