Documentation ¶
Index ¶
- type GoServer
- func (s *GoServer) BaseDial(c string) (*grpc.ClientConn, error)
- func (s *GoServer) BounceImmediateIssue(ctx context.Context, server, title, body string, printImmediately, print bool) (*pbgh.Issue, error)
- func (s *GoServer) BounceIssue(ctx context.Context, title, body string, job string)
- func (s *GoServer) ChooseLead(ctx context.Context, req *pbl.ChooseLeadRequest) (*pbl.ChooseLeadResponse, error)
- func (s *GoServer) CtxLog(ctx context.Context, message string)
- func (s *GoServer) DLog(ctx context.Context, text string)
- func (s *GoServer) DeleteBounceIssue(ctx context.Context, number int32, server string) error
- func (s *GoServer) DeleteIssue(ctx context.Context, number int32) error
- func (s *GoServer) Dial(server string, dialler dialler, builder clientBuilder) (*grpc.ClientConn, error)
- func (s *GoServer) DialLocal(server string) (*grpc.ClientConn, error)
- func (s *GoServer) DialMaster(server string) (*grpc.ClientConn, error)
- func (s *GoServer) DialServer(server, host string) (*grpc.ClientConn, error)
- func (s *GoServer) DoDial(entry *pb.RegistryEntry) (*grpc.ClientConn, error)
- func (s *GoServer) FDial(host string) (*grpc.ClientConn, error)
- func (s *GoServer) FDialServer(ctx context.Context, servername string) (*grpc.ClientConn, error)
- func (s *GoServer) FDialSpecificServer(ctx context.Context, servername string, host string) (*grpc.ClientConn, error)
- func (s *GoServer) FFind(ctx context.Context, servername string) ([]string, error)
- func (s *GoServer) FFindSpecificServer(ctx context.Context, servername string, host string) (*dpb.RegistryEntry, error)
- func (s *GoServer) FPDial(host string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (s *GoServer) GetIP(servername string) (string, int)
- func (s *GoServer) GetServers(servername string) ([]*pb.RegistryEntry, error)
- func (s *GoServer) HTTPGet(ctx context.Context, url string, useragent string) (string, error)
- func (s *GoServer) ImmediateIssue(ctx context.Context, title, body string, printImmediately, print bool) (*pbgh.Issue, error)
- func (s *GoServer) IsAlive(ctx context.Context, in *pbl.Alive) (*pbl.Alive, error)
- func (s *GoServer) LoadData(ctx context.Context, key string, consensus float32) ([]byte, error)
- func (s *GoServer) NewFailMemoryStore() translatedStore
- func (s *GoServer) NewMemoryStore() translatedStore
- func (s *GoServer) PLog(ictx context.Context, message string, level pbd.LogLevel)
- func (s *GoServer) PrepServer(name string)
- func (s *GoServer) PrepServerNoRegister(name string, port int32)
- func (s *GoServer) RaiseIssue(title, body string)
- func (s *GoServer) Read(ctx context.Context, key string, typ proto.Message) (proto.Message, *pbks.ReadResponse, error)
- func (s *GoServer) RegisterLockingTask(task func(ctx context.Context) (time.Time, error), key string)
- func (s *GoServer) RegisterRepeatingTask(task func(ctx context.Context) error, key string, freq time.Duration)
- func (s *GoServer) RegisterRepeatingTaskNoTrace(task func(ctx context.Context) error, key string, freq time.Duration)
- func (s *GoServer) RegisterRepeatingTaskNonMaster(task func(ctx context.Context) error, key string, freq time.Duration)
- func (s *GoServer) RegisterServer(ctx context.Context, servername string, external bool) error
- func (s *GoServer) RegisterServerV2(external bool) error
- func (s *GoServer) RegisterServingTask(task func(ctx context.Context) error, key string)
- func (s *GoServer) ReleaseLockingElection(ctx context.Context, key string, lockKey string) error
- func (s *GoServer) Reregister(ctx context.Context, in *pbl.ReregisterRequest) (*pbl.ReregisterResponse, error)
- func (s *GoServer) RunBackgroundTask(task func(ctx context.Context) error, name string)
- func (s *GoServer) RunLockingElection(ctx context.Context, key string, detail string) (string, error)
- func (s *GoServer) RunSudo()
- func (s *GoServer) Save(ctx context.Context, key string, p proto.Message) error
- func (s *GoServer) SaveData(ctx context.Context, data []byte, key string, consensus float32) error
- func (s *GoServer) SendCrash(ctx context.Context, crashText string, ctype pbbs.Crash_CrashType)
- func (s *GoServer) Serve(opt ...grpc.ServerOption) error
- func (s *GoServer) Shutdown(ctx context.Context, in *pbl.ShutdownRequest) (*pbl.ShutdownResponse, error)
- func (s *GoServer) State(ctx context.Context, in *pbl.Empty) (*pbl.ServerState, error)
- type Registerable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoServer ¶
type GoServer struct { Port int32 Registry *pb.RegistryEntry Register Registerable SkipLog bool KSclient keystoreclient.Keystoreclient Killme bool BadHearts int AlertsFired int Sudo bool RunningFile string MemCap int RPCTracing bool LameDuck bool SendTrace bool AlertsSkipped int64 RunInV2 bool SkipIssue bool DiskLog bool NoBody bool SkipElect bool Store translatedStore FlagUseDataStore bool FlagUseDStore bool NeedsLead bool CurrentLead string LeadState pbg.LeadState LeadFails int NoProm bool Bits int IssueCount int ElideRequests bool // contains filtered or unexported fields }
GoServer The basic server construct
func (*GoServer) BaseDial ¶
func (s *GoServer) BaseDial(c string) (*grpc.ClientConn, error)
BaseDial dials a connection
func (*GoServer) BounceImmediateIssue ¶
func (*GoServer) BounceIssue ¶
BounceIssue raises an issue for a different source
func (*GoServer) ChooseLead ¶
func (s *GoServer) ChooseLead(ctx context.Context, req *pbl.ChooseLeadRequest) (*pbl.ChooseLeadResponse, error)
func (*GoServer) DeleteBounceIssue ¶
func (*GoServer) DeleteIssue ¶
func (*GoServer) Dial ¶
func (s *GoServer) Dial(server string, dialler dialler, builder clientBuilder) (*grpc.ClientConn, error)
Dial a local server
func (*GoServer) DialLocal ¶
func (s *GoServer) DialLocal(server string) (*grpc.ClientConn, error)
DialLocal dials through the local discover
func (*GoServer) DialMaster ¶
func (s *GoServer) DialMaster(server string) (*grpc.ClientConn, error)
DialMaster dials the master server
func (*GoServer) DialServer ¶
func (s *GoServer) DialServer(server, host string) (*grpc.ClientConn, error)
DialServer dials a given server
func (*GoServer) DoDial ¶
func (s *GoServer) DoDial(entry *pb.RegistryEntry) (*grpc.ClientConn, error)
DoDial dials a server
func (*GoServer) FDial ¶
func (s *GoServer) FDial(host string) (*grpc.ClientConn, error)
FDial fundamental dial
func (*GoServer) FDialServer ¶
FDialServer dial a specific job
func (*GoServer) FDialSpecificServer ¶
func (s *GoServer) FDialSpecificServer(ctx context.Context, servername string, host string) (*grpc.ClientConn, error)
FDialSpecificServer dial a specific job on a specific host
func (*GoServer) FFindSpecificServer ¶
func (s *GoServer) FFindSpecificServer(ctx context.Context, servername string, host string) (*dpb.RegistryEntry, error)
FFindSpecificServer dial a specific job on a specific host
func (*GoServer) FPDial ¶
func (s *GoServer) FPDial(host string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
FPDial fundamental dial
func (*GoServer) GetServers ¶
func (s *GoServer) GetServers(servername string) ([]*pb.RegistryEntry, error)
GetServers gets an IP address from the discovery server
func (*GoServer) ImmediateIssue ¶
func (*GoServer) NewFailMemoryStore ¶
func (s *GoServer) NewFailMemoryStore() translatedStore
NewFailMemoryStore fails
func (*GoServer) NewMemoryStore ¶
func (s *GoServer) NewMemoryStore() translatedStore
NewMemoryStore build a memory store for testing
func (*GoServer) PrepServer ¶
PrepServer builds out the server for use.
func (*GoServer) PrepServerNoRegister ¶
PrepServerNoRegister builds out a server that doesn't register
func (*GoServer) RaiseIssue ¶
RaiseIssue raises an issue
func (*GoServer) Read ¶
func (s *GoServer) Read(ctx context.Context, key string, typ proto.Message) (proto.Message, *pbks.ReadResponse, error)
Read a protobuf
func (*GoServer) RegisterLockingTask ¶
func (s *GoServer) RegisterLockingTask(task func(ctx context.Context) (time.Time, error), key string)
RegisterLockingTask registers a locking task to run
func (*GoServer) RegisterRepeatingTask ¶
func (s *GoServer) RegisterRepeatingTask(task func(ctx context.Context) error, key string, freq time.Duration)
RegisterRepeatingTask registers a repeating task with a given frequency
func (*GoServer) RegisterRepeatingTaskNoTrace ¶
func (s *GoServer) RegisterRepeatingTaskNoTrace(task func(ctx context.Context) error, key string, freq time.Duration)
RegisterRepeatingTaskNoTrace registers a repeating task with a given frequency
func (*GoServer) RegisterRepeatingTaskNonMaster ¶
func (s *GoServer) RegisterRepeatingTaskNonMaster(task func(ctx context.Context) error, key string, freq time.Duration)
RegisterRepeatingTaskNonMaster registers a repeating task with a given frequency
func (*GoServer) RegisterServer ¶
RegisterServerIgnore registers this server with ignore master set.
func (*GoServer) RegisterServerV2 ¶
RegisterServerV2 registers this server under the v2 protocol
func (*GoServer) RegisterServingTask ¶
RegisterServingTask registers tasks to run when serving
func (*GoServer) ReleaseLockingElection ¶
func (*GoServer) Reregister ¶
func (s *GoServer) Reregister(ctx context.Context, in *pbl.ReregisterRequest) (*pbl.ReregisterResponse, error)
Reregister this server
func (*GoServer) RunBackgroundTask ¶
RunBackgroundTask with tracing and tracking
func (*GoServer) RunLockingElection ¶
func (*GoServer) Serve ¶
func (s *GoServer) Serve(opt ...grpc.ServerOption) error
Serve Runs the server
func (*GoServer) Shutdown ¶
func (s *GoServer) Shutdown(ctx context.Context, in *pbl.ShutdownRequest) (*pbl.ShutdownResponse, error)
Shutdown brings the server down