service

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSessionServer

func RegisterSessionServer(s *grpc.Server, srv SessionServer)

Types

type CreateRequest

type CreateRequest struct {
	Alpha                *url.URL               `protobuf:"bytes,1,opt,name=alpha" json:"alpha,omitempty"`
	Beta                 *url.URL               `protobuf:"bytes,2,opt,name=beta" json:"beta,omitempty"`
	Configuration        *session.Configuration `protobuf:"bytes,3,opt,name=configuration" json:"configuration,omitempty"`
	Response             string                 `protobuf:"bytes,4,opt,name=response" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetAlpha

func (m *CreateRequest) GetAlpha() *url.URL

func (*CreateRequest) GetBeta

func (m *CreateRequest) GetBeta() *url.URL

func (*CreateRequest) GetConfiguration

func (m *CreateRequest) GetConfiguration() *session.Configuration

func (*CreateRequest) GetResponse

func (m *CreateRequest) GetResponse() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

func (*CreateRequest) XXX_DiscardUnknown

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal

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

func (*CreateRequest) XXX_Merge

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

func (*CreateRequest) XXX_Size

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal

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

type CreateResponse

type CreateResponse struct {
	Session              string         `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
	Prompt               *prompt.Prompt `protobuf:"bytes,2,opt,name=prompt" json:"prompt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*CreateResponse) Descriptor

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

func (*CreateResponse) GetPrompt

func (m *CreateResponse) GetPrompt() *prompt.Prompt

func (*CreateResponse) GetSession

func (m *CreateResponse) GetSession() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset

func (m *CreateResponse) Reset()

func (*CreateResponse) String

func (m *CreateResponse) String() string

func (*CreateResponse) XXX_DiscardUnknown

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal

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

func (*CreateResponse) XXX_Merge

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

func (*CreateResponse) XXX_Size

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal

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

type ListRequest

type ListRequest struct {
	PreviousStateIndex   uint64   `protobuf:"varint,1,opt,name=previousStateIndex" json:"previousStateIndex,omitempty"`
	Specifications       []string `protobuf:"bytes,2,rep,name=specifications" json:"specifications,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListRequest) Descriptor

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

func (*ListRequest) GetPreviousStateIndex

func (m *ListRequest) GetPreviousStateIndex() uint64

func (*ListRequest) GetSpecifications

func (m *ListRequest) GetSpecifications() []string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

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

func (*ListRequest) XXX_Merge

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

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

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

type ListResponse

type ListResponse struct {
	StateIndex           uint64           `protobuf:"varint,1,opt,name=stateIndex" json:"stateIndex,omitempty"`
	SessionStates        []*session.State `protobuf:"bytes,2,rep,name=sessionStates" json:"sessionStates,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*ListResponse) Descriptor

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

func (*ListResponse) GetSessionStates

func (m *ListResponse) GetSessionStates() []*session.State

func (*ListResponse) GetStateIndex

func (m *ListResponse) GetStateIndex() uint64

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) String

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal

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

func (*ListResponse) XXX_Merge

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

func (*ListResponse) XXX_Size

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal

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

type PauseRequest

type PauseRequest struct {
	Specifications       []string `protobuf:"bytes,1,rep,name=specifications" json:"specifications,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PauseRequest) Descriptor

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

func (*PauseRequest) GetSpecifications

func (m *PauseRequest) GetSpecifications() []string

func (*PauseRequest) ProtoMessage

func (*PauseRequest) ProtoMessage()

func (*PauseRequest) Reset

func (m *PauseRequest) Reset()

func (*PauseRequest) String

func (m *PauseRequest) String() string

func (*PauseRequest) XXX_DiscardUnknown

func (m *PauseRequest) XXX_DiscardUnknown()

func (*PauseRequest) XXX_Marshal

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

func (*PauseRequest) XXX_Merge

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

func (*PauseRequest) XXX_Size

func (m *PauseRequest) XXX_Size() int

func (*PauseRequest) XXX_Unmarshal

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

type PauseResponse

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

func (*PauseResponse) Descriptor

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

func (*PauseResponse) ProtoMessage

func (*PauseResponse) ProtoMessage()

func (*PauseResponse) Reset

func (m *PauseResponse) Reset()

func (*PauseResponse) String

func (m *PauseResponse) String() string

func (*PauseResponse) XXX_DiscardUnknown

func (m *PauseResponse) XXX_DiscardUnknown()

func (*PauseResponse) XXX_Marshal

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

func (*PauseResponse) XXX_Merge

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

func (*PauseResponse) XXX_Size

func (m *PauseResponse) XXX_Size() int

func (*PauseResponse) XXX_Unmarshal

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

type ResumeRequest

type ResumeRequest struct {
	Specifications       []string `protobuf:"bytes,1,rep,name=specifications" json:"specifications,omitempty"`
	Response             string   `protobuf:"bytes,2,opt,name=response" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ResumeRequest) Descriptor

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

func (*ResumeRequest) GetResponse

func (m *ResumeRequest) GetResponse() string

func (*ResumeRequest) GetSpecifications

func (m *ResumeRequest) GetSpecifications() []string

func (*ResumeRequest) ProtoMessage

func (*ResumeRequest) ProtoMessage()

func (*ResumeRequest) Reset

func (m *ResumeRequest) Reset()

func (*ResumeRequest) String

func (m *ResumeRequest) String() string

func (*ResumeRequest) XXX_DiscardUnknown

func (m *ResumeRequest) XXX_DiscardUnknown()

func (*ResumeRequest) XXX_Marshal

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

func (*ResumeRequest) XXX_Merge

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

func (*ResumeRequest) XXX_Size

func (m *ResumeRequest) XXX_Size() int

func (*ResumeRequest) XXX_Unmarshal

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

type ResumeResponse

type ResumeResponse struct {
	Prompt               *prompt.Prompt `protobuf:"bytes,1,opt,name=prompt" json:"prompt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*ResumeResponse) Descriptor

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

func (*ResumeResponse) GetPrompt

func (m *ResumeResponse) GetPrompt() *prompt.Prompt

func (*ResumeResponse) ProtoMessage

func (*ResumeResponse) ProtoMessage()

func (*ResumeResponse) Reset

func (m *ResumeResponse) Reset()

func (*ResumeResponse) String

func (m *ResumeResponse) String() string

func (*ResumeResponse) XXX_DiscardUnknown

func (m *ResumeResponse) XXX_DiscardUnknown()

func (*ResumeResponse) XXX_Marshal

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

func (*ResumeResponse) XXX_Merge

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

func (*ResumeResponse) XXX_Size

func (m *ResumeResponse) XXX_Size() int

func (*ResumeResponse) XXX_Unmarshal

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

type Server

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

func New

func New(promptServer *promptsvcpkg.Server) (*Server, error)

func (*Server) Create

func (s *Server) Create(stream Session_CreateServer) error

func (*Server) List

func (s *Server) List(_ context.Context, request *ListRequest) (*ListResponse, error)

func (*Server) Pause

func (s *Server) Pause(_ context.Context, request *PauseRequest) (*PauseResponse, error)

func (*Server) Resume

func (s *Server) Resume(stream Session_ResumeServer) error

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Terminate

func (s *Server) Terminate(_ context.Context, request *TerminateRequest) (*TerminateResponse, error)

type SessionClient

type SessionClient interface {
	Create(ctx context.Context, opts ...grpc.CallOption) (Session_CreateClient, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*PauseResponse, error)
	Resume(ctx context.Context, opts ...grpc.CallOption) (Session_ResumeClient, error)
	Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error)
}

func NewSessionClient

func NewSessionClient(cc *grpc.ClientConn) SessionClient

type Session_CreateClient

type Session_CreateClient interface {
	Send(*CreateRequest) error
	Recv() (*CreateResponse, error)
	grpc.ClientStream
}

type Session_CreateServer

type Session_CreateServer interface {
	Send(*CreateResponse) error
	Recv() (*CreateRequest, error)
	grpc.ServerStream
}

type Session_ResumeClient

type Session_ResumeClient interface {
	Send(*ResumeRequest) error
	Recv() (*ResumeResponse, error)
	grpc.ClientStream
}

type Session_ResumeServer

type Session_ResumeServer interface {
	Send(*ResumeResponse) error
	Recv() (*ResumeRequest, error)
	grpc.ServerStream
}

type TerminateRequest

type TerminateRequest struct {
	Specifications       []string `protobuf:"bytes,1,rep,name=specifications" json:"specifications,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TerminateRequest) Descriptor

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

func (*TerminateRequest) GetSpecifications

func (m *TerminateRequest) GetSpecifications() []string

func (*TerminateRequest) ProtoMessage

func (*TerminateRequest) ProtoMessage()

func (*TerminateRequest) Reset

func (m *TerminateRequest) Reset()

func (*TerminateRequest) String

func (m *TerminateRequest) String() string

func (*TerminateRequest) XXX_DiscardUnknown

func (m *TerminateRequest) XXX_DiscardUnknown()

func (*TerminateRequest) XXX_Marshal

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

func (*TerminateRequest) XXX_Merge

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

func (*TerminateRequest) XXX_Size

func (m *TerminateRequest) XXX_Size() int

func (*TerminateRequest) XXX_Unmarshal

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

type TerminateResponse

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

func (*TerminateResponse) Descriptor

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

func (*TerminateResponse) ProtoMessage

func (*TerminateResponse) ProtoMessage()

func (*TerminateResponse) Reset

func (m *TerminateResponse) Reset()

func (*TerminateResponse) String

func (m *TerminateResponse) String() string

func (*TerminateResponse) XXX_DiscardUnknown

func (m *TerminateResponse) XXX_DiscardUnknown()

func (*TerminateResponse) XXX_Marshal

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

func (*TerminateResponse) XXX_Merge

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

func (*TerminateResponse) XXX_Size

func (m *TerminateResponse) XXX_Size() int

func (*TerminateResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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