session

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSessionsServer added in v0.6.0

func RegisterSessionsServer(s *grpc.Server, srv SessionsServer)

Types

type CreateRequest

type CreateRequest struct {
	Alpha                *url.URL               `protobuf:"bytes,1,opt,name=alpha,proto3" json:"alpha,omitempty"`
	Beta                 *url.URL               `protobuf:"bytes,2,opt,name=beta,proto3" json:"beta,omitempty"`
	Configuration        *session.Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"`
	Response             string                 `protobuf:"bytes,4,opt,name=response,proto3" 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,proto3" json:"session,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Prompt               string   `protobuf:"bytes,3,opt,name=prompt,proto3" 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) EnsureValid added in v0.6.0

func (r *CreateResponse) EnsureValid() error

EnsureValid verifies that a CreateResponse is valid.

func (*CreateResponse) GetMessage added in v0.6.0

func (m *CreateResponse) GetMessage() string

func (*CreateResponse) GetPrompt

func (m *CreateResponse) GetPrompt() string

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,proto3" json:"previousStateIndex,omitempty"`
	Specifications       []string `protobuf:"bytes,2,rep,name=specifications,proto3" 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,proto3" json:"stateIndex,omitempty"`
	SessionStates        []*session.State `protobuf:"bytes,2,rep,name=sessionStates,proto3" 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,proto3" 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 {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PauseResponse) Descriptor

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

func (*PauseResponse) GetMessage added in v0.6.0

func (m *PauseResponse) GetMessage() string

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,proto3" json:"specifications,omitempty"`
	Response             string   `protobuf:"bytes,2,opt,name=response,proto3" 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 {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Prompt               string   `protobuf:"bytes,2,opt,name=prompt,proto3" 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) EnsureValid added in v0.6.0

func (r *ResumeResponse) EnsureValid() error

EnsureValid verifies that a CreateResponse is valid.

func (*ResumeResponse) GetMessage added in v0.6.0

func (m *ResumeResponse) GetMessage() string

func (*ResumeResponse) GetPrompt

func (m *ResumeResponse) GetPrompt() string

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
}

Server provides an implementation of the Sessions service.

func New

func New() (*Server, error)

New creates an instances of the sessions server.

func (*Server) Create

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

Create creates a new session.

func (*Server) List

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

List lists existing sessions.

func (*Server) Pause

func (s *Server) Pause(stream Sessions_PauseServer) error

Pause pauses existing sessions.

func (*Server) Resume

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

Resume resumes existing sessions.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown gracefully shuts down server resources.

func (*Server) Terminate

func (s *Server) Terminate(stream Sessions_TerminateServer) error

Terminate terminates existing sessions.

type SessionsClient added in v0.6.0

type SessionsClient interface {
	Create(ctx context.Context, opts ...grpc.CallOption) (Sessions_CreateClient, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Pause(ctx context.Context, opts ...grpc.CallOption) (Sessions_PauseClient, error)
	Resume(ctx context.Context, opts ...grpc.CallOption) (Sessions_ResumeClient, error)
	Terminate(ctx context.Context, opts ...grpc.CallOption) (Sessions_TerminateClient, error)
}

SessionsClient is the client API for Sessions service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSessionsClient added in v0.6.0

func NewSessionsClient(cc *grpc.ClientConn) SessionsClient

type SessionsServer added in v0.6.0

SessionsServer is the server API for Sessions service.

type Sessions_CreateClient added in v0.6.0

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

type Sessions_CreateServer added in v0.6.0

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

type Sessions_PauseClient added in v0.6.0

type Sessions_PauseClient interface {
	Send(*PauseRequest) error
	Recv() (*PauseResponse, error)
	grpc.ClientStream
}

type Sessions_PauseServer added in v0.6.0

type Sessions_PauseServer interface {
	Send(*PauseResponse) error
	Recv() (*PauseRequest, error)
	grpc.ServerStream
}

type Sessions_ResumeClient added in v0.6.0

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

type Sessions_ResumeServer added in v0.6.0

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

type Sessions_TerminateClient added in v0.6.0

type Sessions_TerminateClient interface {
	Send(*TerminateRequest) error
	Recv() (*TerminateResponse, error)
	grpc.ClientStream
}

type Sessions_TerminateServer added in v0.6.0

type Sessions_TerminateServer interface {
	Send(*TerminateResponse) error
	Recv() (*TerminateRequest, error)
	grpc.ServerStream
}

type TerminateRequest

type TerminateRequest struct {
	Specifications       []string `protobuf:"bytes,1,rep,name=specifications,proto3" 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 {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TerminateResponse) Descriptor

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

func (*TerminateResponse) GetMessage added in v0.6.0

func (m *TerminateResponse) GetMessage() string

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