mem

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2017 Joan Llopis. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2017 Joan Llopis. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStore

type MemStore struct {
	Pool          map[int64]*services.JobDataMsg
	StoreFileName string
	StoreFile     *os.File
	Stat          int
}

MemStore is a Storer implementation over PostgresSQL

func New

func New() (*MemStore, error)

New is a default Storer implementation based upon PostgresSQL

func (*MemStore) AddJob

func (m *MemStore) AddJob(*services.JobMsg) (*services.IdMessage, error)

func (*MemStore) Close

func (d *MemStore) Close() error

Close effectively close de database connection

func (*MemStore) DeleteJob

func (m *MemStore) DeleteJob(*services.IdMessage) (*services.JobMsg, error)

func (*MemStore) Dial

func (d *MemStore) Dial(options store.Options) error

Dial perform the connection to the underlying database server

func (*MemStore) FindJob

func (m *MemStore) FindJob(*services.IdMessage) (*services.JobMsg, error)

func (*MemStore) ListJobs

func (*MemStore) Status

func (d *MemStore) Status() (int, string)

Status return the current status of the underlying database

func (*MemStore) UpdateJob

func (m *MemStore) UpdateJob(*services.JobMsg) (*services.JobMsg, error)

Jump to

Keyboard shortcuts

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